Application shows the method and terminal of language-specific
Technical field
A kind of the present invention relates to communication technology, more particularly to the method and terminal of application display language-specific.
Background technology
On mobile terminal, the language of each application display is and system language synchronous change at present, user setup system language
After sound, the application on mobile terminal just shows the language, if being configured without this language in the multilingual localization of the application, will
Show the default language of application.Adopt in this way, user cannot arrange certain application and show specific language.
Content of the invention
In view of this, method and terminal that a kind of application shows language-specific are embodiments provided, in order to solve
Application present in prior art can not show the problem of language-specific.
First aspect, there is provided a kind of method that application shows language-specific, including:
Judge user's language-specific that whether has been application settings;
If user is application settings language-specific, show the corresponding language-specific of the application.
In conjunction with a first aspect, in the first possible implementation of first aspect, described judge whether user is should
With before setting language-specific, methods described also includes:
Obtain the language that the application is supported;
The language that the application is supported is shown to user, so that the user is to answer in the language that the application is supported
With selection language-specific;
The corresponding application preserves the language-specific, to judge user's language-specific that whether has been application settings.
In conjunction with the first possible implementation of first aspect or first aspect, second in first aspect is possible
In implementation, described judge user's language-specific that whether has been application settings before, methods described also includes:
When starting the application, the configuration information of system is read;
If the user is application settings language-specific, show the corresponding language-specific of the application, including:
If user is application settings language-specific, the language in the configuration information is changed to the specific language
Speech;
The configuration information after by change is transferred to the application, so that the application shows the application upon actuation
Language be the language-specific.
In conjunction with second possible implementation of first aspect, in the third possible implementation of first aspect
In, described judge user's language-specific that whether has been application settings after, methods described also includes:
If user is not application settings language-specific, the configuration information for reading is transferred to the application, with
Toilet is stated application and shows that the language of the application is system language upon actuation.
In conjunction with the first possible implementation of first aspect or first aspect, the 4th kind in first aspect is possible
In implementation, described judge user's language-specific that whether has been application settings before, methods described also includes:
Change system language;
If the user is application settings language-specific, show the corresponding language-specific of the application, including:
If user is application settings language-specific, never call for changing the function of language, keeping the application
Display language be the language-specific.
In conjunction with the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation of first aspect
In, described judge user's language-specific that whether has been application settings after, methods described also includes:
If user is not for application settings language-specific, call for changing the function of language, so as to by the application
Show language be updated to change after system language.
A kind of second aspect, there is provided terminal, including:
Judge module, for judging user's language-specific that whether has been application settings;
Display module, if for the judged result language-specific that has been user for application settings of the judge module, shown
Show the corresponding language-specific of the application.
In conjunction with second aspect, in the first possible implementation of second aspect, also include:
Acquisition module, for obtaining the language that the application is supported;
Interface module, for the language that the application is supported is shown to user, so that the user is in the application
Language-specific is selected for application in the language that holds;
Memory module, preserves the language-specific for the correspondingly application, to judge whether user is application settings
Language-specific.
In conjunction with the first possible implementation of second aspect or second aspect, second in second aspect is possible
In implementation, also include:
Read module, for starting during the application, reads the configuration information of system;
The display module specifically for:
If the judged result of the judge module has been user for application settings language-specific, by the configuration information
Language be changed to the language-specific;The configuration information after by change is transferred to the application, applies so as to described
Show after startup the application language be the language-specific.
In conjunction with second possible implementation of second aspect, in the third possible implementation of second aspect
In, the display module is additionally operable to:
If it is not application settings language-specific that the judged result of the judge module is user, will match somebody with somebody described in reading
Confidence breath is transferred to the application, so that the application shows that the language of the application is system language upon actuation.
In conjunction with the first possible implementation of second aspect or second aspect, the 4th kind in second aspect is possible
In implementation, also include:
Change module, for changing system language;
The display module specifically for:
If the judged result of the judge module has been user for application settings language-specific, never call for changing language
The function of speech, to keep the display language of the application as the language-specific.
In conjunction with the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation of second aspect
In, the display module is additionally operable to:
If the judged result of the judge module be user not for application settings language-specific, call for changing language
The function of speech, so that the display language by the application is updated to the system language after changing.
By above-mentioned technical proposal, for certain application can judge that the application, with the presence or absence of corresponding language-specific, is being deposited
Show corresponding language-specific in language-specific, it is possible to achieve display of the application to language-specific, rather than apply display system
System language, as application can show language-specific, therefore can strengthen termination function, strengthen Consumer's Experience, also strengthen terminal
Competitiveness.
Description of the drawings
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, below will be to making needed for embodiment description
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, for this
For the those of ordinary skill of field, without having to pay creative labor, can be obtaining other according to these accompanying drawings
Accompanying drawing.
Fig. 1 is the schematic flow sheet of the method that a kind of application provided in an embodiment of the present invention shows language-specific;
Fig. 2 is the schematic flow sheet in the embodiment of the present invention for application settings language-specific;
Fig. 3 is the schematic flow sheet of the method that another kind of application provided in an embodiment of the present invention shows language-specific;
Fig. 4 is the schematic flow sheet of the method that another kind of application provided in an embodiment of the present invention shows language-specific;
Fig. 5 is a kind of structural representation of terminal provided in an embodiment of the present invention;
Fig. 6 is the structural representation of another kind of terminal provided in an embodiment of the present invention.
Specific embodiment
Purpose, technical scheme and advantage for making the embodiment of the present invention is clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, to the embodiment of the present invention in technical scheme be clearly and completely described, it is clear that described embodiment is
The a part of embodiment of the present invention, rather than whole embodiments.Embodiment in based on the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is the schematic flow sheet of the method that a kind of application provided in an embodiment of the present invention shows language-specific, including:
11:The terminal judges user language-specific that whether has been application settings;
12:The terminal shows the corresponding language-specific of the application when user is application settings language-specific.
Optionally, when user is application settings language-specific, the language-specific can be protected with the corresponding relation that applies
Exist in data base.Terminal can read the data base afterwards, if there is specific language corresponding with the application in the data base
Speech, then it may determine that going out user for application settings language-specific.
Wherein, the language-specific refers to the language with system language independence, that is to say, that the language-specific can be with system
Language is different, and does not change with the change of system language.It is understood that user can also set the language-specific
Identical with system language, afterwards, after system language is changed, when user does not change language-specific, then language-specific no longer with
System language is identical, or, user can also change language-specific, identical with system language again.
In addition, above-mentioned terminal may refer to mobile terminal, such as mobile phone, computer etc., or, the terminal can also be solid
Determine terminal.
Referring to Fig. 2, there is provided for the flow process of application settings language-specific, including:
21:Terminal obtains the language that application is supported.
So that terminal system is as Android as an example, Android provides the localization scheme of complete set.Developer can be with
The file of country variant language is set up in resource folder res, and the file designation of these national languages has regulation, for example
Developer needs the application of exploitation to support three kinds of language, is English, Chinese and Spanish respectively, then three for can be defined as follows
Plant language:
Values/strings.xml default languages (English)
Values-es/strings.xml is Spanish
Values-zh-rCN/strings.xml simplifieds form of Chinese Character
Obtain which language certain application supports, application can be read under the res files of the application and is defined altogether
Which language, then specified with regard to the name of national language file by android, all languages that the application is supported can be read
Speech.
It is understood that the language of above-mentioned application support can be carried out according to corresponding system for the terminal of different system
Reading, can adopt above-mentioned similar Android system reading flow process.For example, terminal can be according to the configuration of its own system
The language file that each application of storage is supported is read, can just know that each application is concrete further according to the language file naming rule of itself
The language of support.
22:The language that the application is supported is shown to user by the terminal, so that what the user was supported in the application
Language-specific is selected for application in language;
Terminal can provide an interface to user, and the language and user to show application support can be connect by this
Mouth selects language-specific.
For example, the interface is desirably integrated in existing installation kit, for example, be integrated in existing setting (setting) item
In, or, the interface can also be newly-increased installation kit, such as a newly-increased android installation kit (androidpackage,
apk).The interface can include all applications in the terminal and each corresponding configuration information of application, the configuration information bag
Include the language that the application is supported.Now, after user clicks on certain application, system can just read the language that the application is supported
Speech, and list present to user selection.For example, one application support language be above-mentioned three kind language (English, Chinese and
Spanish) when, user can select a kind of as language-specific, for example, the Chinese conduct of selection in three kinds of above-mentioned language
The language-specific of the application, and system language now can be English.
23:The terminal-pair answers the application to preserve the language-specific.
Wherein, application can be stored in the data base of terminal with the corresponding relation of language-specific, and terminal can be led to afterwards
Cross reading database to judge whether a certain application sets language-specific.
Data in the data base can be still preserved after terminal is restarted will not lose, can be in factory reset
These data can just be lost afterwards.
Each item in the data base can correspond to the data of an application, and the application that user does not set can not needed
Storage.The corresponding record of application of each storage can include two fields, i.e. application package name (package_name
) and the corresponding language-specific of application (language) (key).For example, the data of the preservation in the data base can be such as 1 institute of table
Show:
Table 1
Application package name |
The language-specific that user sets |
com.andriod.email |
es |
com.rovio.angrubirds |
zh-rCN |
Wherein, com.andriod.email represents application for email, and com.rovio.angrubirds represents that application is
The bird of indignation, es represent that language-specific is that Spanish, zh-rCN represent that language-specific is Chinese.Therefore, set by above-mentioned
Fixed, user will show that when using email Spanish, user will show Chinese in this game of bird using indignation.
When above-mentioned application shows that language-specific can be when starting application, or application runs.
Specifically, when application is started,
Optionally, described judge user's language-specific that whether has been application settings before, methods described also includes:Start institute
When stating application, the configuration information of system is read;
If the user is application settings language-specific, show the corresponding language-specific of the application, including:If
User is application settings language-specific, and the language in the configuration information is changed to the language-specific;After by change
The configuration information is transferred to the application, so that the application shows that the language of the application is the specific language upon actuation
Speech.
Optionally, described judge user's language-specific that whether has been application settings after, methods described also includes:If used
Family is not application settings language-specific, and the configuration information for reading is transferred to the application, so that described application is being opened
The language for showing the application after dynamic is system language.
Or, in application operation,
Optionally, described judge user's language-specific that whether has been application settings before, methods described also includes:Change system
System language;
If the user is application settings language-specific, show the corresponding language-specific of the application, including:If
User is application settings language-specific, never calls for changing the function of language, keeping the display language of the application to be
The language-specific.
Optionally, described judge user's language-specific that whether has been application settings after, methods described also includes:If used
Call for changing the function of language, to update the display language of the application not for application settings language-specific at family
System language after for change.
The present embodiment judges that the application whether there is corresponding language-specific, there is specific language by using during application
Show corresponding language-specific during speech, it is possible to achieve display of the application to language-specific, rather than apply display system language, by
Language-specific can be shown in application, therefore can strengthen termination function, strengthen Consumer's Experience, also strengthen terminal challenge power.
Fig. 3 is the schematic flow sheet of the method that another kind of application provided in an embodiment of the present invention shows language-specific, including:
31:When terminal starts application, the configuration information of system is read;
Wherein, current system language can be stored in configuration information, for example, in configuration information (configuration)
There is one for local information (locale), in the local information, store current system information.
In prior art, when starting application, terminal can read configuration information and the configuration information is transferred to the application, it
Afterwards the application according to the system language in the configuration information as the application display language.
And the present embodiment can first determine whether user's language-specific that whether has been the application settings, that is, include:
32:The terminal judges user language-specific that whether has been the application settings, if so, executes 33, otherwise, executes 34.
For example, terminal can read above-mentioned data base, if recording the application of the startup in the data base and corresponding to
Language-specific, then indicate that user is application settings language-specific, otherwise, if record should not in the data base
The application of startup and/or the corresponding language-specific of the application, then indicate that user is not the application settings language-specific.
33:The language that the terminal is changed in the configuration information.
That is, the system language in configuration information is changed to the corresponding language-specific of the application.For example, with confidence
System language in breath is English, and terminal knows the corresponding language-specific of the application for Chinese by reading database, then
Language in configuration information is changed to Chinese by English.
34:Configuration information is transferred to the application by the terminal.
When terminal does not change configuration information, the configuration information for being transferred to application refer to comprising system language without
The configuration information of change.And when terminal changes configuration information, the configuration information for being transferred to application refers to language by system language
Speech is changed to the configuration information of language-specific.
35:Application is shown according to the language in configuration information upon actuation.
For example, when user is not the application settings language-specific, include due to being transferred in the configuration information of application
Language be system language, then the application display system language;When user is the application settings language-specific, due to transmission
It is language-specific to the language included in the configuration information of application, then the application shows language-specific.
The present embodiment, can be specific in setting by determining whether application settings language-specific when application starts
During language, the language of application is shown as the language-specific, and is not limited to system language, the function of terminal can be enriched, strengthened
Consumer's Experience, strengthens the competitiveness of terminal.
Fig. 4 is the schematic flow sheet of the method that another kind of application provided in an embodiment of the present invention shows language-specific, including:
41:Operationally, system language there occurs change for the application of terminal.
In prior art, after system language is changed, system can be called for changing the function of language, for example, call
OnConfigurationChanged functions, by calling the onConfigurationChanged functions, be currently running should
Show that language can switch to the system language after changing.
And the present embodiment can first determine whether user's language-specific that whether has been the application settings, that is, include:
42:The terminal judges user language-specific that whether has been the application settings, if so, executes 43, otherwise, executes 44.
For example, terminal can read above-mentioned data base, if recording the application of the startup in the data base and corresponding to
Language-specific, then indicate that user is application settings language-specific, otherwise, if record should not in the data base
The application of startup and/or the corresponding language-specific of the application, then indicate that user is not the application settings language-specific.
43:Terminal is never called for changing the function of language, at this point it is possible to the display language for keeping the application is described
Language-specific is constant.
44:Terminal is called for changing the function of language, now, and the application shows that language is updated to the system after changing
Language.
The present embodiment, can be when language-specific be set by determining whether application settings language-specific, should
Language is shown as the language-specific, and the language-specific can not change with the change of system language, can enrich
The function of terminal, strengthens Consumer's Experience, strengthens the competitiveness of terminal.
In specific embodiment, the setting option (setting) that user can pass through in terminal obtains the language that application is supported
And in the language of the support select language-specific, the afterwards application just can show the language-specific simultaneously upon actuation for application
Do not change with the change of system language.
For example, the system language of user A is Chinese, but through passing through email and Korea's customer communication, therefore which need,
Email can be arranged language-specific for Korean by user A, and convenience exchanging and making a good impression to client with Korea client's.
Again for example, the system language of user B is English, and likes playing game, but some game English is supported not good enough,
That translated is improper, then to English, these just can be supported that the language-specific of imperfect game be set to Chinese by user B,
Chinese can just be shown so when playing using these, and English can be used when using other application, facilitate user to make
With.
Fig. 5 is a kind of structural representation of terminal provided in an embodiment of the present invention, and the terminal 50 includes 51 He of judge module
Display module 52;Judge module 51 is used for judging user's language-specific that whether has been application settings;If display module 52 is used for
The judged result of the judge module has been user for application settings language-specific, shows the corresponding language-specific of the application.
Optionally, also include:
Acquisition module, for obtaining the language that the application is supported;
Interface module, for the language that the application is supported is shown to user, so that the user is in the application
Language-specific is selected for application in the language that holds;
Memory module, preserves the language-specific for the correspondingly application, to judge whether user is application settings
Language-specific.
Optionally, also include:
Read module, for starting during the application, reads the configuration information of system;
The display module specifically for:
If the judged result of the judge module has been user for application settings language-specific, by the configuration information
Language be changed to the language-specific;The configuration information after by change is transferred to the application, applies so as to described
Show after startup the application language be the language-specific.
Optionally, the display module is additionally operable to:
If it is not application settings language-specific that the judged result of the judge module is user, will match somebody with somebody described in reading
Confidence breath is transferred to the application, so that the application shows that the language of the application is system language upon actuation.
Optionally, also include:
Change module, for changing system language;
The display module specifically for:
If the judged result of the judge module has been user for application settings language-specific, never call for changing language
The function of speech, to keep the display language of the application as the language-specific.
Optionally, the display module is additionally operable to:
If the judged result of the judge module be user not for application settings language-specific, call for changing language
The function of speech, so that the display language by the application is updated to the system language after changing.
Referring to Fig. 6, another kind of terminal is embodiments provided, the terminal 60 includes processor 61 and user interface
(user interface, UI) 62;Processor 61 is used for judging user's language-specific that whether has been application settings;User interface 62
If for the judged result language-specific that has been user for application settings of the processor, showing that the application is corresponding specific
Language.
Optionally, processor 61 is additionally operable to obtain the language that the application is supported;User interface 62 is additionally operable to the place
The language that the application that reason device 61 determines is supported is shown to user, so that the user is in the language that the application is supported
Application selects language-specific;The terminal can also include that memorizer, the memorizer are used for the corresponding application and preserve the user
The language-specific set by user interface 62, to judge user's language-specific that whether has been application settings.
Optionally, the configuration information of system, when processor 61 is additionally operable to start the application, is read;If user is application
Language-specific is set, the language in the configuration information is changed to the language-specific;Confidence will be matched somebody with somebody described in after change
Breath is transferred to the application, so as to by user interface 62, the application shows that the language of the application is the spy upon actuation
Attribute is sayed.
Optionally, if it is not application settings language-specific that processor 61 is additionally operable to user, the configuration that will be read
Information transfer gives the application, so as to by user interface 62, the application shows that the language of the application is system upon actuation
Language.
Optionally, processor 61 is additionally operable to change system language;If user is application settings language-specific, never call
For changing the function of language, to keep the language that the application is shown by user interface 62 as the language-specific.
Optionally, if processor 61 is additionally operable to user not for application settings language-specific, call for changing language
Function, so as to by the application by the language that user interface 62 shows be updated to change after system language.
The present embodiment judges that the application whether there is corresponding language-specific, there is specific language by using during application
Show corresponding language-specific during speech, it is possible to achieve display of the application to language-specific, rather than apply display system language, by
Language-specific can be shown in application, therefore can strengthen termination function, strengthen Consumer's Experience, also strengthen terminal challenge power.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each function
The division of module is illustrated, and in practical application, can distribute above-mentioned functions by different function moulds as desired
Block is completed, will the internal structure of device be divided into different functional modules, to complete all or part of work(described above
Energy.The specific work process of the system, apparatus, and unit of foregoing description, may be referred to corresponding in preceding method embodiment
Journey, will not be described here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with
Realize by another way.For example, device embodiment described above be only schematically, for example, the module or
The division of unit, only a kind of division of logic function can have other dividing mode, for example multiple units when actually realizing
Or component can in conjunction with or be desirably integrated into another system, or some features can be ignored, or not execute.Another, institute
The coupling each other for showing or discussing or direct-coupling or communication connection can be by some interfaces, device or unit
INDIRECT COUPLING or communication connection, can be electrical, mechanical or other forms.
The unit that illustrates as separating component can be or may not be physically separate, aobvious as unit
The part for showing can be or may not be physical location, you can be located at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in the application each embodiment can be integrated in a processing unit, it is also possible to
It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list
Unit both can be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is realized and as independent production marketing or use using in the form of SFU software functional unit
When, can be stored in a computer read/write memory medium.Such understanding is based on, the technical scheme of the application is substantially
The part that in other words prior art is contributed or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, use so that a computer including some instructions
Equipment (can be personal computer, server, or network equipment etc.) or processor (processor) execute the application each
The all or part of step of embodiment methods described.And aforesaid storage medium includes:USB flash disk, portable hard drive, read only memory
(ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD
Etc. various can be with the medium of store program codes.
The above, above example only in order to the technical scheme of the application to be described, rather than a limitation;Although with reference to front
State embodiment to be described in detail the application, it will be understood by those within the art that:Which still can be to front
State the technical scheme described in each embodiment to modify, or equivalent is carried out to which part technical characteristic;And these
Modification is replaced, and does not make the essence of appropriate technical solution depart from the spirit and scope of each embodiment technical scheme of the application.