A kind of start language setting method of multi-country language electric system and device
Technical field
The present invention relates to a kind of multi-country language electric system, particularly relate to a kind of start language setting method and device of multi-country language electric system.
Background technology
Multi-country language electric system is that a kind of being supported under the multilingual pattern worked, perhaps support the mutual interpretative function of various language, being mainly used in the electronic system of using and learning that adapts to various mother tongue crowds, can be multi-country language electric system as electronic dictionary, the multilingual mobile phone of support and MP3 etc.
The existing at present Language Processing mode that multi-country language electric system is set is normally after entering system, and the language of system be arranged in the language of giving tacit consent to start shooting, and is for example English.Be provided with in series then and remove to set the language of oneself being familiar with in the option.The system that enters so also needs later on to seek option setting is set, and will cause very burden for the user who is unfamiliar with multi-country language electric system or is unfamiliar with default language, particularly when the user uses multi-country language electric system for the first time.
In addition, on the interface, show several language in the present multi-country language electric system usually simultaneously, select language to enter system then by key up and down.But after how having worked as category of language, the LCD size that shows there is requirement, can not on the interface, shows several language simultaneously sometimes; And on a display interface, show multilingual simultaneously, to the having relatively high expectations of the design and running efficient of explicit function, complicated.
Therefore, need can after the multi-country language electric system start, can conveniently select own needed language for the user provides a kind of, with user-friendly.
Summary of the invention
The technical problem to be solved in the present invention just provides a kind of start language setting method and device of multi-country language electric system, can allow the user set the language of oneself being familiar with quickly and easily in the multi-country language electric system start.
In order to solve the problems of the technologies described above, the invention provides a kind of method of language setting of multi-country language electric system, comprise the steps:
(1) according to built-in category of language, storage country variant verbal cue language in the interface display character list, each writes down corresponding a kind of verbal cue language; Represent the Language State that system need be provided with the language Status Flag; By contingency table, that the Language State sign is corresponding with certain record in the interface display character list;
(2) after the multi-country language electric system start,,, specifically comprise by designated time intervals roll display country variant verbal cue language according to built-in category of language:
(A) pick up counting;
(B), find corresponding record in the interface display character list by contingency table, and this record is shown according to current Language State sign;
(C) if timing arrives, then entry time is interrupted, and the Language State sign adds 1, corresponding to next bar record of interface display character list; If the Language State sign greater than maximal value, then puts 0 with this Language State sign; Return step (A);
(3) if the user presses the key of appointment, then system enters the corresponding Language State of verbal cue language of current demonstration.
Further, said method also comprises following characteristics: described Language State sign is also corresponding with the language switching table of representing the country variant language, described language switching table is used to store various countries' spoken and written languages character string that needs show, by this language switching table the current shown language of system is switched to other national language;
Described step further comprises the steps: in (3)
(a) if the user presses any key, then enter keyboard interrupt,, search corresponding language switching table according to the Language State sign;
(b), system is arranged to the corresponding Language State of Language State sign according to the language switching table.
Further, said method also comprises following characteristics: after described step (2) the multi-country language electric system start, also carry out initialization, the value of Language State sign is used as default or last time start back record the value of Language State sign.
Further, said method also comprises following characteristics: the key of described appointment is not for comprising any key of ON/OFF key.
In order to solve the problems of the technologies described above, the present invention also provides a kind of start language setting device of multi-country language electric system, comprises keyboard, display unit, also comprises: storage unit and processing unit,
Described storage unit is used to store the Language State sign, at character code value that shows on the display unit and the related information between them, and wherein the Language State sign is represented the Language State that system need be provided with;
Described processing unit connects storage unit, keyboard, display unit, and comprising: main control unit, time Interrupt Process unit, interface literal display unit, keyboard interrupt processing unit and system language are provided with the unit,
Described main control unit after being used for system carried out initialization, picks up counting, and generation time interrupts, and allocating time Interrupt Process unit; When the user presses the key of appointment, then call keyboard Interrupt Process unit;
Described time Interrupt Process unit is used to handle the time interruption that certain hour produces at interval, and according to current Language State sign, finds corresponding record in the interface display character list by contingency table, and call interface literal display unit;
Described interface literal display unit is used for the verbal cue language that will show to display unit output;
Described keyboard interrupt processing unit is used to handle keyboard interrupt, and the calling system language is provided with the unit;
Described system language is provided with the unit, is used for language that the display language of system is arranged to select, enters the corresponding language state.
Further, said apparatus also comprises following characteristics: described storage unit comprises:
First memory is random access memory ram, is used to store the Language State sign;
Second memory, be nonvolatile memory, be used to be stored in the character code value that shows on the display unit, and described Language State sign and described related information between the character code value that shows on the display unit, comprise interface display character list, language switching table, contingency table; In the described interface display character list each writes down corresponding a kind of national language signal language; Described contingency table will be stored the address correlation of every record of Language State sign and interface display character list; Described language switching table is used to store various countries' spoken and written languages character string that needs show, by this language switching table the current shown language of system is switched to other national language.
Further, said apparatus also comprises following characteristics: described storage unit also comprises the 3rd storer, this storer is read-write nonvolatile memory, be used to preserve the value of Language State sign, when entering system once more, display unit begins roll display verbal cue language from the represented language of this value.
The invention has the beneficial effects as follows:
1, by rolling provided by the invention language form is set, can enter quickly by any key after seeing the language of oneself being familiar with oneself needs Language State, and need not to be provided with in system language.
2, can be at different areas, sell the language in area with the fastest prompting product, make the user own familiar language being set and entering system of the fastest time.
Description of drawings
Fig. 1 is the structured flowchart of the embodiment of the invention;
Fig. 2 is a processing unit structured flowchart in the embodiment of the invention;
Fig. 3 is the interface display character representation intention of the embodiment of the invention;
Fig. 4 is the contingency table synoptic diagram of the embodiment of the invention;
Fig. 5 is the language switching table synoptic diagram of the embodiment of the invention;
Fig. 6 is the process flow diagram of the embodiment of the invention.
Embodiment
The present invention is described in detail below in conjunction with drawings and the specific embodiments.
Referring to Fig. 1, Fig. 2, the start language setting device of the multi-country language electric system of present embodiment comprises: keyboard 1; Storage unit 2; Processing unit 3; Display unit 4.
Described processing unit 3 connects storage unit, keyboard, display unit, comprises that main control unit 31, time Interrupt Process unit 32, interface literal display unit 33, keyboard interrupt processing unit 34, system language are provided with unit 35, wherein:
Main control unit 31 after being used for system carried out initialization, picks up counting, and generation time interrupts, and allocating time Interrupt Process unit; When the user presses the key of appointment, then call keyboard Interrupt Process unit;
Time Interrupt Process unit 32 is used to handle the time interruption that certain hour produces at interval, and according to current Language State sign, finds corresponding record in the interface display character list by contingency table, and call interface literal display unit 33;
Described interface literal display unit 33 is used for speaking to the verbal cue that display unit 4 outputs will show;
Described keyboard interrupt processing unit 34 is used to handle keyboard interrupt, and the calling system language is provided with unit 35;
Described system language is provided with unit 35 and is used for language that the display language of system is arranged to select, enters the corresponding language state.
Described storage unit 2 comprises:
First memory is random access memory ram, is used to store the Language State sign, and this Language State sign is represented the Language State that system need be provided with;
Second memory, be nonvolatile memory,, be used to be stored in the character code value that shows on the display unit 4 as ROM, and described Language State sign and described related information between the character code value that shows on the display unit 4, comprise interface display character list, language switching table, contingency table;
Described interface display character list is used to store country variant verbal cue language, and each in the interface display character list writes down corresponding a kind of verbal cue language.As shown in Figure 3, the Table0 of interface display character list, Tablel.....TableN are the representation language sequence identifications, the numeric representation of 16 systems will be on screen the character value of roll display, as " D6H, D0H, CEH; C4H " is expression " Chinese " character, " 45H, 6EH, 67H; 6CH; 69H, 73H, 68H " is expression " English " character.
Wherein, the order that order and interface display character list are set of Language State sign is consistent on the language of sign, system can give every of the interface display character list to be recorded in the corresponding address of distribution in the second memory, the value of Language State sign and the address of every record of interface display character list are recorded in the contingency table, as shown in Figure 4.By the Language State sign (order of this sign is from Chinese, English .... French is corresponding one by one with the language order of interface display character list) can obtain in the interface display character list address of corresponding record with it, can very simply locate the code value of interface display character list like this, thereby show the signal language when just having entered system easily by the Language State sign.
Described language switching table is used for various countries' spoken and written languages character string that storage system shows, the current shown language of system can be switched to other national language by this language switching table.
As shown in Figure 5, the language switching table has N, and the corresponding table of each language content of national language speech (have in each table mutually should) if current demonstration is that Chinese is shown, after selecting English, will be changed (replacement) at these two tables.Switching in the language switching table is switched by the structure of definition, the member variable of structure all is set to pointer variable, each structure member variable points to the Chinese character of own corresponding Chinese table respectively as " setting ", " file ", " input word ".In the present embodiment with the national language of Chinese, with English language as switching as current demonstration.When language switches, according to the value of Language State sign in the current first memory (promptly, selected certain state's language such as English) will be original each structure member variable pointer that points to character string in the Chinese table point to the English character of English table respectively as " Setting ", " File ", " Input Word ".Just can reach system language by such manner and switch, and then the executive system language is provided with the purpose of unit.
Wherein, above-mentioned language switching table comprises more than two at least, can be state's language such as day, method, moral, meaning.
Described storage unit 2 can also comprise the 3rd storer, this storer is read-write nonvolatile memory, as Flash storer, synchronous static random-access memory SSRAM, be used under the state of system closedown, preserving the value of Language State sign, just can directly read the value of Language State sign in this storer like this in next time after the start, can guarantee that like this language of first demonstration was the language that was provided with last time when entered system next time.
According to built-in category of language, storage country variant verbal cue language in the interface display character list, each writes down corresponding a kind of verbal cue language; Represent the Language State that system need be provided with the language Status Flag; By contingency table, that the Language State sign is corresponding with certain record in the interface display character list.
As shown in Figure 6, in the present embodiment, the flow process of multi-country language electric system start is as follows:
Step 501, system boot;
Step 502, if system starts shooting for the first time, perhaps system does not store the value of Language State sign when shutting down last time, then carry out initialized operation after, the value of Language State sign is set to 0, i.e. default value, and picking up counting;
The initialized value of Language State sign can be any one value of 0~N, and wherein the value of each Language State sign is that accumulative total increases progressively.
If system stores the value of Language State sign when shutting down last time, when then system starts shooting next time, in initialized process, read the value of Language State sign when shutting down last time earlier, and this value is write in the first memory.Display unit 4 will be worth represented language from this and begin roll display like this.
Step 503 according to the value of Language State sign, by contingency table, is searched with it corresponding record to the interface display character list, obtains this interface display character list code value (this code value is represented 16 system numerical value of certain state's language).
Step 504 is by calling interface literal display unit shows above-mentioned code value correspondence on LCD signal language (that is corresponding language);
Step 505, the stand-by period interrupts or keyboard interrupt;
If timing arrives, then entry time is interrupted, and then execution in step 506, and the Language State sign is added 1, if the Language State sign greater than maximal value, then puts 0 with this Language State sign, repeats 503~505 then;
The timing that is used for the time interruption can be that a period of time (is generally a second level arbitrarily, such as 1 second, 2 seconds), in the time Interrupt Process step, making the Language State sign is 1 and increase progressively at a certain time interval with step-length, judges that whether this value is greater than the numerical value of N that language is set at last.If then the value of Language State sign is set to 0, gets back to original state, circulates once more.
If keyboard interrupt, then execution in step 507, judge the value of current Language State sign, if storage unit 2 has the Flash storer, then the value with the Language State sign judged stores in this Flash storer;
Step 508 is searched the language switching table according to the value of Language State sign in 507 steps;
Step 509 is provided with system language, and system enters the corresponding language state, as, the Chinese language state;
Step 510, keyboard interrupt finishes;
Step 511 is carried out other processing.
Wherein, the priority of keyboard interrupt is higher than the time interruption, can enter system (except that ON/OFF ON/OFF) by any key.