CN109634684A - Method, apparatus, computer equipment and the storage medium of application program load language - Google Patents

Method, apparatus, computer equipment and the storage medium of application program load language Download PDF

Info

Publication number
CN109634684A
CN109634684A CN201811494097.0A CN201811494097A CN109634684A CN 109634684 A CN109634684 A CN 109634684A CN 201811494097 A CN201811494097 A CN 201811494097A CN 109634684 A CN109634684 A CN 109634684A
Authority
CN
China
Prior art keywords
language
application program
load
interface function
preset interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811494097.0A
Other languages
Chinese (zh)
Other versions
CN109634684B (en
Inventor
李山虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wanxing Polytron Technologies Inc
Original Assignee
Wanxing Polytron Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wanxing Polytron Technologies Inc filed Critical Wanxing Polytron Technologies Inc
Priority to CN201811494097.0A priority Critical patent/CN109634684B/en
Publication of CN109634684A publication Critical patent/CN109634684A/en
Application granted granted Critical
Publication of CN109634684B publication Critical patent/CN109634684B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation

Abstract

The embodiment of the invention provides method, apparatus, computer equipment and the computer readable storage mediums of a kind of application program load language.The embodiment of the present invention belongs to the multilingual Auto-load technic field of application program, when realizing that application program load is multilingual, if receiving the enabled instruction of application program, the current language setting of acquisition system, all controls in the interface of the application program are traversed simultaneously, it is arranged according to the language, by preset interface function load language unified in each control, corresponding language resource is set, due to having used unified preset interface function to load multi-language resource, realize the function of solving with less code and load a large amount of multilingual entry contents, the code efficiency of user is greatly saved, reduce the error rate of calling, it is convenient simultaneously that the unified of call error is modified, improve the development efficiency and operation and maintenance efficiency of application program, enhance the stability of product.

Description

Method, apparatus, computer equipment and the storage medium of application program load language
Technical field
The present invention relates to the multilingual loading technique field of application program more particularly to a kind of sides of application program load language Method, device, computer equipment and computer readable storage medium.
Background technique
Exploitation needs international application program under MacOS system, needs the user for country variant to show different Language Interface.The multilingual method of the display provided in developing instrument under MacOS is to pass through original function NSLocalizedString is called one by one, how many item is multilingual will to call how many times function NSLocalizedString will lead to following phenomenon:
1) these call language to be distributed across in different files, and each sound code file literary style is not general, therefore source generation Code is more, as soon as such as application program need the product of multilingual display at 1000, then multilingual difference at needs 1000 Calling code be dispersed in multiple source code files;
2) it is more due to being needed in each view sound code file when the international application program of exploitation needs to load multilingual The interface display of language will be called sentence one by one one by one, and view sound code file to be treated is relatively more, the content that do not call It cannot show corresponding multilingual, it is thus possible to can have the situation for leakage calling occur and cause to show corresponding multi-lingual Speech.
3) and there are call statements due to being character string as parameter, is easy the incoming mistake of parameter and is difficult to find, than As " Download " has accidentally been write as " D0wnload ".Simultaneously because source file is more, if application program show it is multilingual go out It is wrong to be difficult to proofread, and be easy to change phenomenon in the presence of leakage.
Show that multilingual method makes when therefore, it is necessary to develop international Multilanguage application program, in traditional technology The development efficiency of application program reduces.
Summary of the invention
The embodiment of the invention provides method, apparatus, computer equipment and the computers of a kind of application program load language Readable storage medium storing program for executing, be able to solve in traditional technology develop it is inefficient when international application program needs to show multilingual Problem.
In a first aspect, the embodiment of the invention provides a kind of methods of application program load language, which comprises connect Receive the enabled instruction of application program;If the application program launching, the current language setting of system is obtained;It traverses described using journey All controls in the interface of sequence;It is arranged according to the language, by described in the preset interface function load in each control Corresponding language resource is arranged in language.
Second aspect, the embodiment of the invention also provides a kind of devices of application program load language comprising: it receives single Member, for receiving the enabled instruction of application program;It is current to obtain system if be used for the application program launching for acquiring unit Language setting;Traversal Unit, all controls in the interface for traversing the application program;Loading unit, for according to Language setting loads the language by the preset interface function in each control and corresponding language resource is arranged.
The third aspect, the embodiment of the invention also provides a kind of computer equipments comprising memory and processor, it is described Computer program is stored on memory, the processor realizes the application program load language when executing the computer program The method of speech.
Fourth aspect, it is described computer-readable to deposit the embodiment of the invention also provides a kind of computer readable storage medium Storage media is stored with computer program, and the computer program executes the processor when being executed by processor described using journey The method of sequence load language.
The embodiment of the invention provides method, apparatus, computer equipment and the computers of a kind of application program load language Readable storage medium storing program for executing.The embodiment of the present invention belongs to the multilingual Auto-load technic field of application program, realizes that application program adds When carrying multilingual, if receiving the enabled instruction of application program, the current language setting of system is obtained, while traversing the application All controls in the interface of program are arranged according to the language, are added by preset interface function unified in each control It carries the language and corresponding language resource is set, due to having used unified preset interface function to load multi-language resource, realize Solves the function of loading a large amount of multilingual entry contents with less code, to realize that application program can be very easily International multilingual translation product is realized, simultaneously because the application method of general multilingual load, realizes application program energy Multilingual file under enough Auto Loader Resource TOCs, when interface uses, call method is unified general, without all more Language calls in plain text one by one, and the code efficiency of user is greatly saved, and reduces the error rate of calling, while conveniently wrong to calling Unified modification accidentally, improves the development efficiency and operation and maintenance efficiency of application program, enhances the stability of product.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the application scenarios schematic diagram of the method for application program load language provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of the method for application program load language provided in an embodiment of the present invention;
Fig. 3 is that the original text of an English interface in the method for application program load language provided in an embodiment of the present invention is shown Effect diagram;
It is converted after method of the English interface using application program load language provided in an embodiment of the present invention that Fig. 4 is Fig. 3 For the display effect schematic diagram at simplified form of Chinese Character interface;
Fig. 5 is another flow diagram of the method for application program load language provided in an embodiment of the present invention;
Fig. 6 is the schematic block diagram of the device of application program load language provided in an embodiment of the present invention;
Fig. 7 is another schematic block diagram of the device of application program load language provided in an embodiment of the present invention;And
Fig. 8 is the schematic block diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Referring to Fig. 1, Fig. 1 is the application scenarios signal of the method for application program load language provided in an embodiment of the present invention Figure.The application scenarios include:
(1) terminal.What user used is equipped with the computer equipment of application program, and the application program is due to use environment Or the difference of use groups, it needs the setting for showing language according to system and then carries out multilingual load, with aobvious in difference Show and switches between language.The terminal can be mobile phone, smartwatch, laptop, tablet computer or desktop computer Equal electronic equipments.
Each body of work process is as follows in Fig. 1: user's using terminal, is equipped with application program, application program in terminal The current language setting of system is needed support, carries out multilingual load and display application program is arranged with system current language Interface.After user's selecting system shows language, the application program installed in using terminal open application program etc. to application The operation of program, application program receives the enabled instruction of user's operation application program, if the application program launching, obtains system Current language setting, traverses all controls in the interface of the application program, is arranged according to the language, by each described Preset interface function in control loads the language and corresponding language resource is arranged.
It should be noted that only illustrated in Fig. 1 mobile phone as terminal, in the actual operation process, the type of terminal It being not limited to shown in Fig. 1, the terminal can also be the electronic equipments such as smartwatch, laptop or tablet computer, on The application scenarios for stating the method for application program load language are merely illustrative technical solution of the present invention, are not used to limit this hair Bright technical solution.
Fig. 2 is the schematic flow chart of the method for application program load language provided in an embodiment of the present invention.This applies journey The method of sequence load language applied to Fig. 1 terminal in, with complete application program load language method it is all or part of Function.
Referring to Fig. 2, Fig. 2 is the flow diagram of the method for application program load language provided in an embodiment of the present invention. As shown in Fig. 2, this approach includes the following steps S210-S240:
S210, the enabled instruction for receiving application program.
Specifically, when user uses application program, the operation to application program is generally had, for example, passing through smart phone When using application program, generally application program can be operated by point touching screen.When user opens application program, can generally it click Application program corresponds to internal system to start application program, is exactly that application program by system receives enabled instruction, applies Program will be opened to show the interface of application program.
If S220, the application program launching, the current language setting of system is obtained.
Specifically, user use application program when, typically under the current system environment that terminal has been set into Row.For example, for new smart phone, when booting up starting for the first time, system can generally allow user to carry out the base of system This setting, such as the display language that selection system uses can choose for the speech habits that different regions or user use Simplified form of Chinese Character, Chinese-traditional or English etc. show language, to meet user's use demands.In addition to being opened for the first time in the new machine of progress It carries out system when dynamic to show outside the setting of language, user can also carry out system automatically and show language according to actual use demand Setting, related setting can be carried out by the correspondence option in system set interface, after setting completed, system can be cut automatically It changes on corresponding display language.
When application program is developed, multiple systems can be also supported to show language, generally to adapt to different system environments. For example, application program can be shown automatically with simplified form of Chinese Character if system environments is simplified form of Chinese Character, application environment is English, using journey Sequence also automatically can be with English display, that is, the display language of application program is to show the variation of language with system and become automatically Change.Therefore, when application program launching, the current language setting of system, the application program language current according to system to be obtained It is arranged and shows corresponding language, for example, the current display language of system is set as simplified form of Chinese Character, application program is just in simplified Text display, if the current display language of system is revised as English by simplified form of Chinese Character, application program can be also revised as by simplified form of Chinese Character English.
S230, all controls in the interface of the application program are traversed.
Wherein, it traverses, English is Traversal, refers to along certain search pattern, successively does to node each in tree Once and only do primary access.
Specifically, in embodiments of the present invention, all controls in the interface by traversing the application program, can not lose All controls in the interface of application program are leaked, so that all controls in the interface of application journey are carried out with the place of multilingual load Reason.
S240, it is arranged according to the language, the language is loaded by the preset interface function in each control and is set Set corresponding language resource.
Wherein, preset interface function, is the interface function that an escape character (ESC) string constructing in advance is read, and preparatory base In each control of preset interface function expansion.Preset interface function in the embodiment of the present invention allows the application to add automatically The multilingual file under program resource catalogue is carried, when interface is used since call method is unified and general, in application program It is called in plain text one by one without all multilingual loads, the code efficiency and maintenance efficiency of user is greatly saved, reduces calling Error rate.
Specifically, application program is arranged according to the language, is loaded by the preset interface function in each control Corresponding language resource is arranged in the language, and corresponding language then is arranged with the language in the interface of the application program and is shown Show.If the current language of the application program system is set as simplified form of Chinese Character, application program is connect by default in the control Mouth function loading application programs need the corresponding language resource file of simplified form of Chinese Character to be shown on interface, then apply journey for described The interface of sequence is shown with simplified form of Chinese Character, to realize the switching from calling original text to output translation.Fig. 3 and Fig. 4 are please referred to, Fig. 3 is The original text display effect schematic diagram of an English interface in the method for application program load language provided in an embodiment of the present invention, figure 4 is are converted into simplified form of Chinese Character after method of the English interface using application program load language provided in an embodiment of the present invention of Fig. 3 The display effect schematic diagram at interface, that is, Fig. 3 are the original text display effects of English interface, and Fig. 4 is that application program progress is multi-lingual The display effect of simplified form of Chinese Character, technical solution through the embodiment of the present invention can support the languages of All Countries after speech load Display.
When the embodiment of the present invention realizes that application program load is multilingual, if receiving the enabled instruction of application program, obtain The current language setting of system, while all controls in the interface of the application program are traversed, it is arranged according to the language, is passed through Unified preset interface function loads the corresponding language resource of the language setting in each control, unified due to having used Preset interface function load multi-language resource, realize to solve with less code and load a large amount of multilingual entry contents Function, to realize that application program can very easily realize international multilingual translation product, simultaneously because general is more The application method of language load, realize application program can multilingual file under Auto Loader Resource TOC, at interface Call method is unified general when use, calls without all multilingual plaintexts one by one, the code efficiency of user is greatly saved, subtracts Lack the error rate called, while conveniently the unified of call error has been modified, improves the development efficiency and operation of application program Maintenance efficiency enhances the stability of product.
Referring to Fig. 5, another process that Fig. 5 is the method for application program load language provided in an embodiment of the present invention is shown It is intended to.In this embodiment, it before the step of calling preset interface function is to extend each control, also wraps It includes:
S208, the building preset interface function;
The preset interface function by each control loads the language and corresponding language resource is arranged Before step, further includes:
S209, call the preset interface function to extend each control.
Further, the step of building preset interface function includes:
Design the interface function of escape character (ESC) string reading;
Obtain multi-language source file;
The multi-language source file is called by the interface function.
Wherein, interface function is exactly that some module has been write to the function of other modules, and briefly interface function is exactly Public Function in class.
Specifically, design the interface function of escape character (ESC) string reading, a that is, extension class, by extension class plus The multi-language resource of all controls on interface is carried, for example, can be with the interface function that Swift programming language designs are as follows: LocalizeStrings (tableName:String?=nil).This loading method has versatility and integrates the function Ease for use, to be easy to implement.
After designing interface function, the preparation of multi-language source file is needed.The code of namely interface function is ready to After, it is also necessary to be multi-language source file so that application program calls the multi-language source file by interface function. A variety of translated resources files are required there are many language, multi-language source file needs certain format, for example, can be Following format: " original text "=" translation ", according to the above-mentioned format between multilingual, if application program need English and it is simplified in It is converted between text, for example during being converted to the changing of simplified form of Chinese Character from English, the English and simplified form of Chinese Character of load make actual It can be following the same numerous entries: " Yes "=" being " in;" No "=" no ";" Close "=" closing ";" Buy "=" Purchase ".
Finally, application program calls the multi-language source file, the interface function building by the interface function It completes, the interface function can be required each control calling for carrying out multilingual load.
Further, call the preset interface function to extend each control, for example, extending based on interface function Each view, for example, view NSView, control NSControl, button NSButtonCell, text box It needs to carry out in the various pieces at the composition such as NSTextFieldCell, table NSTableView and menu NSMenu interface multi-lingual Say the main body of load.For example, the interface function extension control NSControl based on above-mentioned building is as follows:
Due to the versatility of interface function, the part for the multilingual display that needs to internationalize in application program can pass through tune With the interface function built expand come.
Then forms, view etc. one by one can be loaded in the application needs to show multilingual main part, To carry out the multilingual load of application program.For example, loading multilingual sentence such as in the multilingual treatment process of load of view Under: self.view.localizeStrings ().
By the way that the method achieve the functions of solving a large amount of multilingual entry contents of load with less code, thus real The existing application program translated product that can very easily internationalize improves simultaneously because general application method, reduces error rate The development efficiency and maintenance efficiency of product, enhances the stability of product.
In one embodiment, include: the step of all controls in the interface of the traversal application program
All controls in the interface of the application program are traversed by array.
Wherein, array, English are Array, refer to the set of homogeneous data element, the element sequence being ordered into may include One-dimensional, two-dimentional (matrix) and three-dimensional array etc..
Specifically, application program is obtained described by this extension class of interface function in such a way that array takes traversal All controls in the interface of application program, automatic traversal loads the multi-language resource of all controls on interface, for example, if using journey There are five components on the interface of sequence, handle each component one by one using traversal by an array, can guarantee each group Part will not be omitted, to improve the order and efficiency of component processing, avoid malfunctioning, and this loading method has versatility sum aggregate At the ease for use of the function, external auxiliary tool is not needed, to improve the efficiency of the practice of multilingual load.
In one embodiment, the preset interface function by each control loads the language setting pair Before the step of language resource answered, further includes:
Parameter in the preset interface function is set;
The preset interface function by each control loads the language and corresponding language resource is arranged Step includes:
According to the parameter in the preset interface function, by described in the preset interface function load in each control The language resource of the corresponding language setting of parameter.
Specifically, when application program load is multilingual, according to actual needs, some places are needed according to parameter spirit Variation living, the processing with parameter can be carried out in function using calling at this time, that is, assign to the character in interface function Different values realizes that different parameters is called.For example, in the Application Program Interface of a video playing, can include play and Suspend two function buttons, it, can be by interface letter when playing out and suspending the multilingual load of two function buttons One character WORD is set in number, assigns different parameter values to character WORD to realize two function buttons of broadcasting and pause Multilingual load, for example, when character WORD is assigned a value of " playing " in interface, that is, when " WORD=broadcasting ", carry out " broadcasting " Corresponding multilingual load carries out " pause " if character WORD is assigned a value of " suspending " in interface, that is, when " WORD=pause " Corresponding multilingual load can be enhanced load multilingual flexibility in this way.
Referring to Fig. 6, Fig. 6 is the schematic block diagram of the device of application program load language provided in an embodiment of the present invention. Corresponding to the method for above-mentioned application program load language, the embodiment of the present invention also provides a kind of dress of application program load language It sets.As shown in fig. 6, the device of the application program load language includes the method for executing above-mentioned application program load language Unit, the device can be configured in the terminal devices such as mobile phone.Specifically, referring to Fig. 6, the application program load language Device 600 includes receiving unit 601, acquiring unit 602, Traversal Unit 603 and loading unit 604.
Wherein, receiving unit 601, for receiving the enabled instruction of application program;
Acquiring unit 602 obtains the current language setting of system if being used for the application program launching;
Traversal Unit 603, all controls in the interface for traversing the application program;
Loading unit 604 is loaded for being arranged according to the language by the preset interface function in each control Corresponding language resource is arranged in the language.
Referring to Fig. 7, Fig. 7 be application program load language provided in an embodiment of the present invention device another schematically Block diagram.As shown in fig. 7, in this embodiment, the device 600 of the application program load language further include:
Display unit 605 is shown for corresponding language to be arranged with the language in the interface of the application program.
Please continue to refer to Fig. 7, as shown in fig. 7, in this embodiment, the device 600 of the application program load language is also Include:
Expanding element 606, for calling the preset interface function to extend each control;
Construction unit 607, for constructing the preset interface function.
Please continue to refer to Fig. 7, as shown in fig. 7, in this embodiment, the construction unit 607 includes:
Subelement 6071 is designed, for designing the interface function of escape character (ESC) string reading;
Subelement 6072 is obtained, for obtaining multi-language source file;
Subelement 6073 is called, for calling the multi-language source file by the interface function.
In one embodiment, the Traversal Unit 603, institute in the interface for traversing the application program by array There is control.
In one embodiment, the device 600 of the application program load language further include:
Setting unit 608, the parameter for being arranged in the preset interface function;
The loading unit 604, for according to the parameter in the preset interface function, by each control Preset interface function loads the language resource of the corresponding language setting of the parameter.
It should be noted that it is apparent to those skilled in the art that, above-mentioned application program load language Device and each unit specific implementation process, can be with reference to the corresponding description in preceding method embodiment, for the side of description Just and succinctly, details are not described herein.
Meanwhile the division of each unit and connection type are only used for illustrating in the device of above-mentioned application program load language It is bright, in other embodiments, the device of application program load language can be divided into as required to different units, can also will answered The different order of connection and mode are taken, with each unit in the device of program load language to complete above-mentioned application program load language All or part of function of the device of speech.
The device of above-mentioned application program load language can be implemented as a kind of form of computer program, the computer program It can be run in computer equipment as shown in Figure 8.
Referring to Fig. 8, Fig. 8 is a kind of schematic block diagram of computer equipment provided in an embodiment of the present invention.The computer Equipment 800 can be the computer equipments such as server, the component or component being also possible in other equipment.
Refering to Fig. 8, which includes processor 802, memory and the net connected by system bus 801 Network interface 805, wherein memory may include non-volatile memory medium 803 and built-in storage 804.
The non-volatile memory medium 803 can storage program area 8031 and computer program 8032.The computer program 8032 are performed, the method that may make processor 802 to execute one such application program load language.
The processor 802 is for providing calculating and control ability, to support the operation of entire computer equipment 800.
The built-in storage 804 provides environment for the operation of the computer program 8032 in non-volatile memory medium 803, should When computer program 8032 is executed by processor 802, processor 802 may make to execute one such application program load language Method.
The network interface 805 is used to carry out network communication with other equipment.It will be understood by those skilled in the art that in Fig. 8 The structure shown, only the block diagram of part-structure relevant to the present invention program, does not constitute and is applied to the present invention program The restriction of computer equipment 800 thereon, specific computer equipment 800 may include more more or fewer than as shown in the figure Component perhaps combines certain components or with different component layouts.For example, in some embodiments, computer equipment can Only to include memory and processor, in such embodiments, reality shown in the structure and function and Fig. 8 of memory and processor It is consistent to apply example, details are not described herein.
Wherein, the processor 802 is for running computer program 8032 stored in memory, to realize following step It is rapid: to receive the enabled instruction of application program;If the application program launching, the current language setting of system is obtained;Described in traversal All controls in the interface of application program;It is arranged according to the language, is added by the preset interface function in each control It carries the language and corresponding language resource is set.
In one embodiment, the processor 802 described passes through the preset interface function in each control realizing After loading the step of corresponding language resource is arranged in the language, also perform the steps of
Corresponding language is arranged with the language in the interface of the application program to show.
In one embodiment, the processor 802 described passes through the preset interface function in each control realizing Before loading the step of corresponding language resource is arranged in the language, also perform the steps of
The preset interface function is called to extend each control.
In one embodiment, the processor 802 is realizing the calling preset interface function to extend each institute Before the step of stating control, also perform the steps of
Construct the preset interface function.
In one embodiment, the processor 802 is when realizing the step of the building preset interface function, specifically It performs the steps of
Design the interface function of escape character (ESC) string reading;
Obtain multi-language source file;
The multi-language source file is called by the interface function.
In one embodiment, the processor 802 all controls in the interface for realizing the traversal application program Step when, implement following steps:
All controls in the interface of the application program are traversed by array.
In one embodiment, the processor 802 described passes through the preset interface function in each control realizing Before loading the step of corresponding language resource is arranged in the language, also perform the steps of
Parameter in the preset interface function is set;
Realize that the preset interface function by each control loads the language and corresponding language money is arranged When the step in source, following steps are implemented:
According to the parameter in the preset interface function, by described in the preset interface function load in each control The language resource of the corresponding language setting of parameter.
It should be appreciated that in embodiments of the present invention, processor 802 can be central processing unit (Central ProcessingUnit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable GateArray, FPGA) or other programmable logic devices Part, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or The processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process, It is that can be completed by computer program, which can be stored in a computer readable storage medium.The computer Program is executed by least one processor in the computer system, to realize the process step of the embodiment of the above method.
Therefore, the present invention also provides a kind of computer readable storage mediums.The computer readable storage medium can be non- The computer readable storage medium of volatibility, the computer-readable recording medium storage have computer program, the computer program Processor is set to execute following steps when being executed by processor:
A kind of computer program product, when run on a computer, so that computer executes in the above various embodiments The step of method of described application program load language.
The computer readable storage medium can be the internal storage unit of aforementioned device, such as the hard disk or interior of equipment It deposits.What the computer readable storage medium was also possible to be equipped on the External memory equipment of the equipment, such as the equipment Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the computer readable storage medium can also both include the inside of the equipment Storage unit also includes External memory equipment.
It is apparent to those skilled in the art that for convenience of description and succinctly, foregoing description is set The specific work process of standby, device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
The computer readable storage medium can be USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), the various computer readable storage mediums that can store program code such as magnetic or disk.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only Only a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.This hair Unit in bright embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the present invention Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with It is that two or more units are integrated in one unit.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product, It can store in one storage medium.Based on this understanding, technical solution of the present invention is substantially in other words to existing skill The all or part of part or the technical solution that art contributes can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that an electronic equipment (can be individual Computer, terminal or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
The above description is merely a specific embodiment, but bright protection scope of the invention is not limited thereto, and is appointed What those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or Replacement, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention Ying Yiquan Subject to the protection scope that benefit requires.

Claims (10)

1. a kind of method of application program load language, which is characterized in that the described method includes:
Receive the enabled instruction of application program;
If the application program launching, the current language setting of system is obtained;
Traverse all controls in the interface of the application program;
It is arranged according to the language, the language is loaded by the preset interface function in each control, corresponding language is set Say resource.
2. the method for application program load language according to claim 1, which is characterized in that described to pass through each control In preset interface function load the step of corresponding language resource is arranged in the language after, further includes:
Corresponding language is arranged with the language in the interface of the application program to show.
3. the method for application program load language according to claim 1, which is characterized in that described to pass through each control In preset interface function load the step of corresponding language resource is arranged in the language before, further includes:
The preset interface function is called to extend each control.
4. the method for application program load language according to claim 3, which is characterized in that described to call the preset interface Before the step of function is to extend each control, further includes:
Construct the preset interface function.
5. the method for application program load language according to claim 4, which is characterized in that the building preset interface The step of function includes:
Design the interface function of escape character (ESC) string reading;
Obtain multi-language source file;
The multi-language source file is called by the interface function.
6. the method for application program load language according to claim 1, which is characterized in that the traversal application program Interface in all controls the step of include:
All controls in the interface of the application program are traversed by array.
7. the method for application program load language according to claim 6, which is characterized in that described to pass through each control In preset interface function load the step of corresponding language resource is arranged in the language before, further includes:
Parameter in the preset interface function is set;
The preset interface function by each control loads the step of corresponding language resource is arranged in the language Include:
According to the parameter in the preset interface function, the parameter is loaded by the preset interface function in each control The language resource of the corresponding language setting.
8. a kind of device of application program load language characterized by comprising
Receiving unit, for receiving the enabled instruction of application program;
Acquiring unit obtains the current language setting of system if being used for the application program launching;
Traversal Unit, all controls in the interface for traversing the application program;
Loading unit loads institute's predicate by the preset interface function in each control for being arranged according to the language Corresponding language resource is arranged in speech.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and is connected with the memory Processor;The memory is for storing computer program;The processor is based on running and storing in the memory Calculation machine program, to execute as described in claim any one of 1-7 the step of the method for application program load language.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program apply the processor execution as described in any one of claim 1-7 The step of method of program load language.
CN201811494097.0A 2018-12-07 2018-12-07 Method and device for loading language to application program, computer equipment and storage medium Active CN109634684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811494097.0A CN109634684B (en) 2018-12-07 2018-12-07 Method and device for loading language to application program, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811494097.0A CN109634684B (en) 2018-12-07 2018-12-07 Method and device for loading language to application program, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109634684A true CN109634684A (en) 2019-04-16
CN109634684B CN109634684B (en) 2022-04-01

Family

ID=66071764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811494097.0A Active CN109634684B (en) 2018-12-07 2018-12-07 Method and device for loading language to application program, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109634684B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647371A (en) * 2019-08-22 2020-01-03 深圳联友科技有限公司 Multi-language resource file analysis method and system based on service configuration
CN110737454A (en) * 2019-10-17 2020-01-31 腾讯科技(深圳)有限公司 Software project updating method and device, computer equipment and storage medium
CN110825470A (en) * 2019-09-19 2020-02-21 五八有限公司 Application program language localization method and device, electronic equipment and storage medium
CN110990105A (en) * 2019-12-10 2020-04-10 北京小米移动软件有限公司 Interface display method and device, electronic equipment and storage medium
CN111459602A (en) * 2020-05-21 2020-07-28 深圳万测试验设备有限公司 Multi-language switching method and device of application program and storage medium
CN112596841A (en) * 2020-12-24 2021-04-02 厦门亿联网络技术股份有限公司 Interface language switching method, device, equipment and storage medium
CN112835633A (en) * 2020-12-17 2021-05-25 海信视像科技股份有限公司 Display device and control method of display language
CN113407288A (en) * 2021-06-29 2021-09-17 杭州海康威视数字技术股份有限公司 Data processing method and device and electronic equipment
CN114896005A (en) * 2022-04-26 2022-08-12 平安普惠企业管理有限公司 Application program language configuration method based on artificial intelligence and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398845A (en) * 2008-11-05 2009-04-01 深圳市金蝶中间件有限公司 Multi-language binding method and system in web applications
CN101441567A (en) * 2008-11-18 2009-05-27 宇龙计算机通信科技(深圳)有限公司 Method and system for supporting multiple-language user interface in mobile terminal
CN104123150A (en) * 2013-04-28 2014-10-29 百度在线网络技术(北京)有限公司 Language resource management method and device for application program
CN105867920A (en) * 2016-03-29 2016-08-17 海尔优家智能科技(北京)有限公司 APP multi-language switching method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398845A (en) * 2008-11-05 2009-04-01 深圳市金蝶中间件有限公司 Multi-language binding method and system in web applications
CN101441567A (en) * 2008-11-18 2009-05-27 宇龙计算机通信科技(深圳)有限公司 Method and system for supporting multiple-language user interface in mobile terminal
CN104123150A (en) * 2013-04-28 2014-10-29 百度在线网络技术(北京)有限公司 Language resource management method and device for application program
CN105867920A (en) * 2016-03-29 2016-08-17 海尔优家智能科技(北京)有限公司 APP multi-language switching method and system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647371A (en) * 2019-08-22 2020-01-03 深圳联友科技有限公司 Multi-language resource file analysis method and system based on service configuration
CN110825470A (en) * 2019-09-19 2020-02-21 五八有限公司 Application program language localization method and device, electronic equipment and storage medium
CN110737454A (en) * 2019-10-17 2020-01-31 腾讯科技(深圳)有限公司 Software project updating method and device, computer equipment and storage medium
CN110990105A (en) * 2019-12-10 2020-04-10 北京小米移动软件有限公司 Interface display method and device, electronic equipment and storage medium
CN110990105B (en) * 2019-12-10 2024-04-23 北京小米移动软件有限公司 Interface display method and device, electronic equipment and storage medium
CN111459602A (en) * 2020-05-21 2020-07-28 深圳万测试验设备有限公司 Multi-language switching method and device of application program and storage medium
CN112835633A (en) * 2020-12-17 2021-05-25 海信视像科技股份有限公司 Display device and control method of display language
CN112596841A (en) * 2020-12-24 2021-04-02 厦门亿联网络技术股份有限公司 Interface language switching method, device, equipment and storage medium
CN112596841B (en) * 2020-12-24 2022-08-12 厦门亿联网络技术股份有限公司 Interface language switching method, device, equipment and storage medium
CN113407288A (en) * 2021-06-29 2021-09-17 杭州海康威视数字技术股份有限公司 Data processing method and device and electronic equipment
CN114896005A (en) * 2022-04-26 2022-08-12 平安普惠企业管理有限公司 Application program language configuration method based on artificial intelligence and related equipment

Also Published As

Publication number Publication date
CN109634684B (en) 2022-04-01

Similar Documents

Publication Publication Date Title
CN109634684A (en) Method, apparatus, computer equipment and the storage medium of application program load language
US10990367B2 (en) Application development method, tool, and device, and storage medium
US7577937B2 (en) Methods and systems for generating a configurable user interface
JP2021012740A (en) Compound control
US10838744B2 (en) Web component design and integration system
CN109542459A (en) Application program packaging method and device, computer installation and computer storage medium
CN103123605B (en) A kind of Android platform automatic integration test method and device
CN105893061A (en) Application program development method and system
CN109408086A (en) Interface updating method, device, computer equipment and the storage medium of APP
US8448151B2 (en) Method for binarizing initial script on operating system and operating method of binary script
CN106648569A (en) Target serialization achieving method and device
CN111143403A (en) SQL conversion method and device and storage medium
CN107797996B (en) Entry translation method and device
CN115291946A (en) Hongmong system transplanting method, device, electronic equipment and readable medium
CN106873989A (en) Application program building method and device
CN114706616A (en) Applet construction method and device
CN115167941A (en) Front-end component processing method, device, terminal and storage medium
CN109189426A (en) A kind of upgrade method, device, storage medium and electronic equipment
CN111399926A (en) Method and device for downloading starting program
CN109960522B (en) Software upgrading method and device
JP2007080049A (en) Built-in program generation method, built-in program development system and information table section
Mutiara et al. Developing a SAAS-Cloud Integrated Development Environment (IDE) for C, C++, and Java
JP2013029999A (en) Test code generation device, test code generation method, and test code generation program
JP4925514B2 (en) Program execution control method, program, execution control apparatus, and recording medium by internal / external event driven system
CN112612531A (en) Application program starting method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant