Movatterモバイル変換


[0]ホーム

URL:


CN102637168A - Method for realizing automatic language translation in graphical user interface - Google Patents

Method for realizing automatic language translation in graphical user interface
Download PDF

Info

Publication number
CN102637168A
CN102637168ACN2012100721237ACN201210072123ACN102637168ACN 102637168 ACN102637168 ACN 102637168ACN 2012100721237 ACN2012100721237 ACN 2012100721237ACN 201210072123 ACN201210072123 ACN 201210072123ACN 102637168 ACN102637168 ACN 102637168A
Authority
CN
China
Prior art keywords
language
user interface
file
translation
graphical user
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.)
Pending
Application number
CN2012100721237A
Other languages
Chinese (zh)
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.)
Shenzhen Gongjin Electronics Co Ltd
Original Assignee
Shenzhen Gongjin Electronics Co Ltd
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 Shenzhen Gongjin Electronics Co LtdfiledCriticalShenzhen Gongjin Electronics Co Ltd
Priority to CN2012100721237ApriorityCriticalpatent/CN102637168A/en
Publication of CN102637168ApublicationCriticalpatent/CN102637168A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

The invention provides a method for realizing automatic language translation in a graphical user interface. Language characters in the graphical user interface serve as source language characters and are replaced by target language characters different from the source language characters, so that automatic translation is realized. By the aid of the method, the characters in the GUI (graphical user interface) can be automatically translated.

Description

A kind of method that realizes automatic language translation in the graphic user interface
Technical field
The present invention relates to the field of graphical user interfaces of application program, the method for particularly a kind of close friend's that the language that the user needs is provided for program user graphic user interface.
Background technology
(Graphical User Interface GUI) is meant the computer operation environment user interface that adopts graphics mode to show for graphic user interface or graphical user interface.Compare with the Command Line Interface that early stage computing machine uses, graphical interfaces is more easy to be easy-to-use for the user.The widespread use of GUI is one of significant achievement of computer nowadays development; From then on the use people that it is very easy to unprofessional user no longer need memorize mechanically a large amount of orders, the substitute is availablely to use through modes such as window, menu, buttons to operate easily.Graphic user interface can reduce user's cognitive load, the consistance that keeps the interface, the creative demands that satisfies the different target user, user-friendliness, icon identification balance, icon function consistance, set up interface and user's interaction.
When application program is released; The general programmer that adopts is used skilled language, during the graphical interfaces GUI that provides for the user, is to adopt the mother tongue of the familiar language of programmer such as English or programmer naturally; But when the user of application program is the user of other Languages for mother tongue; Generally need the character translation on the GUI be become the literal of user's mother tongue, the literal on the GUI of programmer use here is called as source language, and the language (generally being user's mother tongue) that the user needs is a target language.Present way is, designs the correspondence table of Zhang Yuan's language to target language, and such correspondence table generally is an excel form at present; Can provide also and can create by the own source that provides according to the translator-target language vocabulary by the user, get into the editing interface of graphic user interface, the manual literal that the literal of source language is found corresponding target language from correspondence table; And the source language text of correspondence replaced to the literal of target language; Accomplish editor then and preserve, the source language translation of using when having accomplished graphic user interface from program like this becomes targeted customer's target languages such as mother tongue, and this method is directly perceived; Be prone to shape, but will expend many time.
Summary of the invention
For solving the deficiency that adopts human translation among the present GUI between the different language, the present invention provides a kind of method that realizes automatic language translation in the graphic user interface, directly from the backstage of graphical interface program target language is replaced source language.
Technical scheme of the present invention is: a kind of method that realizes automatic language translation in the graphic user interface; With spoken and written languages in the described graphic user interface as source language text; Replace to a kind of target language literal that is different from source language text in addition, translation process may further comprise the steps automatically:
The step of the copy of the file in steps A, the generation graphical user interface program in the language catalogue;
Step B, obtain the id value and the step of source language text accordingly in the file of a plurality of id values of the html page that writes down in the duplicate of the document in the language catalogue in the graphical user interface program and corresponding spoken and written languages;
Step C, retrieval source language obtain the target language literal of source language text correspondence to the correspondence table of target language;
Step D, the target language literal replaced the step of the corresponding spoken and written languages of a plurality of id values of the html page that write down in the duplicate of the document in the language catalogue in the graphical user interface program;
Step e, preserve the duplicate of the document file in the language catalogue in the graphical user interface program, and the catalogue file name is modified as the step of the filename of target language by regulation.
Further, in the above-mentioned realization graphic user interface in the method for automatic language translation: described graphic user interface source program is that Javascript writes.The a plurality of id values of the html page of described record are that suffix is the file of js with the file of corresponding spoken and written languages.Described source language is the excel form to the correspondence table of target language.
The present invention provides a kind of method that realizes automatic language translation in the graphic user interface, through this method, can translate automatically the literal among the GUI.
Below in conjunction with specific embodiment the present invention is done comparatively detailed description.
Description of drawings
Fig. 1 is a system flowchart of the present invention.
Embodiment
Embodiment 1, and current have the GUI page of a product only to realize Chinese, English bilingual, because the market demand; Will be with this product promotion market of going abroad; Therefore to realize 20 multilinguals again, and consider, be on the basis of the original page, realize efficiently multilingual.At present, the multilingual basic realization of page architecture is every kind of corresponding catalogue of language; Be the js file under the catalogue, what write down in the js file is a plurality of id values of the html page and corresponding spoken and written languages, the js file under the corresponding corresponding language catalogue of a kind of language of each page; So implement; To realize exactly how the spoken and written languages in the js file under each catalogue being replaced to other language, and the id value is constant, just can on the basis of the original page, realize multilingual.And developing instrument is realized the process of this replacement, is to realize with the JS language, on the IE browser, carries out.
Javascript and Jscript are called for short JS, are most popular page script language on the Internet, and it is the necessary a kind of technology of website front end exploitation.JS mainly does the interface, is used for client execution script exploitation on the browser end just, and JS is short and pithy, and it is again specially for making a kind of simple programming language that the Web webpage is made to measure simultaneously.
The language location mode is as the form of " id: value ", and " id " attribute of element can play the effect that is positioned at page appropriate section display text among " id " corresponding html, and " value " is exactly concrete spoken and written languages.Give an example, if we will generate the language of German, the method that relatively is fit to is exactly, and the language catalogue copy portion that en_us is English is come, and then " value " literal in each file wherein replaced with corresponding German translation, and " id " is constant.The process of this whole replacement is exactly that the multilingual translation instrument will be realized so.
In addition, we also have a excel table of depositing various interpretive languages, and every replacement one " value " will be arrived the translation of searching corresponding language in this part excel table, replacement then.
As shown in Figure 1, may further comprise the steps of present embodiment:
1, original en_us English-language catalogue copy is a, the language that RNTO is new;
2, the js file under the catalogue is operated, navigated to each " value ";
3, retrieval excel table according to original ready-made sign, finds the translation of corresponding language;
4, with the translation replacement of finding in the excel table corresponding " value ";
5, the js file that will replace is exported preservation again.
Five above steps are exactly the process of searching and replacing, and present embodiment uses the js language of selecting to be simple and easy to usefulness, and the problem of the page selects the solution of js language good more only.At first, the id:value form in the js file is kept in " var data_language " variable, is the variable that js itself just can discern, and just can directly get " value " through data_language [" id "]; Js itself just has the object interface that can operate the excel table in addition, can quote very easily and retrieve the excel table.
The step that the Js programming tool is realized is following:
1, english language catalogue copy is a, and called after state language name;
2, certain language js file is passed through<script type=" text/javascript " src=''''></script>The src attribute be linked in the js code;
3, the variable in the language js file is operated, the organizational form of its variable is following JSON data layout;
var?data?=?{
xxx?:?{
yyy?:?value1,
zzz?:?value2
}
}
According to the variable in the js file, like data [xxx] [yyy], the multi-lingual excel document of index, value_xxx translated in the language that obtains certain state, and assignment data [xxx] [yyy]=value_xxx, by that analogy, realizes language replacement one by one; The data variable of having replaced is write back to original again with the form of JSON data and preserves.
Also available c/c++ Programming with Pascal Language etc. other, programming language establishment GUI.
The c/c++ Programming with Pascal Language, because the c/c++ language can't discern the variable in the js file, can only be with the formal operations of text; Navigate to " value " in each js file, the process of programming will relate to loaded down with trivial details string operation, storage allocation; Releasing memory, cumbersome compiling debugging etc.; Retrieval excel table can be selected the VC instrument, and corresponding insert is installed, or the excel table is output as the plain text form, uses the c/c++ Programming with Pascal Language merely.But in any case, all inevitably to relate to loaded down with trivial details string operation, also need consider different disposal routes special string format.
Select the vb programming, vb itself comprises the plug-in unit of excel table handling, can directly operate the excel table; For vb also is to have loaded down with trivial details string operation; Want special study vb language in order to realize this conversion instrument.
Comprehensive above analysis, here we select the js Programming with Pascal Language
Instrument is to realize that with the js script than C language and VB, he has following benefits: at first, it is quite convenient that it handles the js file, can quote wherein variable very easily, than the C language, saved character string complicated operations in a lot of C language; Secondly, the interface of EXCEL document read-write is provided, provides support for making things convenient for index EXCEL document; At last, the js Programming with Pascal Language is flexible, and it is simple that programmed logic is wanted relatively.
The Js programming is simple, and it is convenient to move, and programming need not compiling, does not have the loaded down with trivial details very long compilation process of C language, has edited code and can pass through browser execution, and the operation discovery is wrong can be easy to the miscue orientation problem according to browser.
If make a mistake in the instrument operational process, can support to rerun from mistake, debugging is convenient; Running log is detailed.
Instrumentation code is portable strong.

Claims (4)

CN2012100721237A2012-03-192012-03-19Method for realizing automatic language translation in graphical user interfacePendingCN102637168A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN2012100721237ACN102637168A (en)2012-03-192012-03-19Method for realizing automatic language translation in graphical user interface

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN2012100721237ACN102637168A (en)2012-03-192012-03-19Method for realizing automatic language translation in graphical user interface

Publications (1)

Publication NumberPublication Date
CN102637168Atrue CN102637168A (en)2012-08-15

Family

ID=46621565

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN2012100721237APendingCN102637168A (en)2012-03-192012-03-19Method for realizing automatic language translation in graphical user interface

Country Status (1)

CountryLink
CN (1)CN102637168A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102982127A (en)*2012-11-152013-03-20深圳市共进电子股份有限公司Method of replacing characters in batch to achieve multi-language version and batch processing device
CN102981851A (en)*2012-11-152013-03-20深圳市共进电子股份有限公司Rapid development and maintenance system and method for embedded type network device interface language
CN103279341A (en)*2013-05-092013-09-04四三九九网络股份有限公司Method and device for Chinesization of flash games in batches
CN103336768A (en)*2013-06-142013-10-02深圳市比邻软件有限公司Method, system and device for translating application programming interface on handheld equipment
CN107402746A (en)*2016-05-202017-11-28阿里巴巴集团控股有限公司A kind of method and device of automatic code generating file
CN109976734A (en)*2019-02-262019-07-05林庆斌A method of realizing mother tongue programming
CN110083845A (en)*2019-04-252019-08-02数译(成都)信息技术有限公司Web page translation method and system
CN110187916A (en)*2019-05-312019-08-30四川长虹电器股份有限公司The method for generating Word document based on data configuration
CN110471659A (en)*2019-08-162019-11-19珠海格力电器股份有限公司Multilingual method and system, human-machine interface configuration software end and equipment end
CN110580348A (en)*2017-07-042019-12-17艾朝君chinese character and Russian intercommunication mutual recognition technical method
CN110580360A (en)*2017-07-042019-12-17艾朝君intercommunication mutual identification technique for Chinese characters and all language characters
CN110580359A (en)*2017-07-042019-12-17艾朝君Chinese character and Arabic intercommunication mutual identification technical method
CN111221617A (en)*2020-01-202020-06-02厦门靠谱云股份有限公司Method and system for multi-language switching in single project based on webpage

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7415405B2 (en)*2003-09-182008-08-19International Business Machines CorporationDatabase script translation tool
CN101398845A (en)*2008-11-052009-04-01深圳市金蝶中间件有限公司Multi-language binding method and system in web applications
CN102109958A (en)*2011-03-042011-06-29深圳市开立科技有限公司Method and system for realizing multilingual user interface
CN102289376A (en)*2011-09-162011-12-21烽火通信科技股份有限公司Embedded multi-language WEB page realization method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7415405B2 (en)*2003-09-182008-08-19International Business Machines CorporationDatabase script translation tool
CN101398845A (en)*2008-11-052009-04-01深圳市金蝶中间件有限公司Multi-language binding method and system in web applications
CN102109958A (en)*2011-03-042011-06-29深圳市开立科技有限公司Method and system for realizing multilingual user interface
CN102289376A (en)*2011-09-162011-12-21烽火通信科技股份有限公司Embedded multi-language WEB page realization method and system

Cited By (19)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102982127A (en)*2012-11-152013-03-20深圳市共进电子股份有限公司Method of replacing characters in batch to achieve multi-language version and batch processing device
CN102981851A (en)*2012-11-152013-03-20深圳市共进电子股份有限公司Rapid development and maintenance system and method for embedded type network device interface language
CN102982127B (en)*2012-11-152015-10-21深圳市共进电子股份有限公司Batch substitute character string realizes method and the batch-processed devices of multi-lingual version
CN103279341A (en)*2013-05-092013-09-04四三九九网络股份有限公司Method and device for Chinesization of flash games in batches
CN103279341B (en)*2013-05-092016-08-17四三九九网络股份有限公司The method and apparatus of batch Chinesizing flash game
CN103336768A (en)*2013-06-142013-10-02深圳市比邻软件有限公司Method, system and device for translating application programming interface on handheld equipment
CN103336768B (en)*2013-06-142016-09-07深圳市比邻软件有限公司A kind of method, system and device of the Application Program Interface translated in handheld device
CN107402746A (en)*2016-05-202017-11-28阿里巴巴集团控股有限公司A kind of method and device of automatic code generating file
CN107402746B (en)*2016-05-202020-08-04阿里巴巴集团控股有限公司Method and device for automatically generating code file
CN110580348A (en)*2017-07-042019-12-17艾朝君chinese character and Russian intercommunication mutual recognition technical method
CN110580360A (en)*2017-07-042019-12-17艾朝君intercommunication mutual identification technique for Chinese characters and all language characters
CN110580359A (en)*2017-07-042019-12-17艾朝君Chinese character and Arabic intercommunication mutual identification technical method
CN109976734A (en)*2019-02-262019-07-05林庆斌A method of realizing mother tongue programming
CN109976734B (en)*2019-02-262022-07-12林庆斌Method for realizing native language programming
CN110083845A (en)*2019-04-252019-08-02数译(成都)信息技术有限公司Web page translation method and system
CN110187916A (en)*2019-05-312019-08-30四川长虹电器股份有限公司The method for generating Word document based on data configuration
CN110471659A (en)*2019-08-162019-11-19珠海格力电器股份有限公司Multilingual method and system, human-machine interface configuration software end and equipment end
CN110471659B (en)*2019-08-162023-07-21珠海格力电器股份有限公司Multilingual implementation method and system, man-machine interface configuration software end and equipment end
CN111221617A (en)*2020-01-202020-06-02厦门靠谱云股份有限公司Method and system for multi-language switching in single project based on webpage

Similar Documents

PublicationPublication DateTitle
CN102637168A (en)Method for realizing automatic language translation in graphical user interface
CN107844299B (en)Method for implementing Web application development tool
RU2390834C2 (en)Method and device for browsing and interacting with electronic worksheet from web-browser
US20130227522A1 (en)Integrated Application Localization
US8612893B2 (en)Dynamic screentip language translation
US8468494B2 (en)In-line editor
US9910554B2 (en)Assisting graphical user interface design
CN113076167A (en)Code processing method and related equipment
US20130262968A1 (en)Apparatus and method for efficiently reviewing patent documents
US20150278190A1 (en)Web server system, dictionary system, dictionary call method, screen control display method, and demonstration application generation method
US8042095B2 (en)Application development environment with features for increasing the ease and efficiency of viewing function help text
CN112668290A (en)Dynamic form generation method and system based on gridding design
US20150331783A1 (en)Debugging data format conversion
EP4042272A1 (en)User interface generation
CN113296759B (en)User interface processing method, user interface processing system, device and storage medium
US9613089B2 (en)Form template refactoring
KR20220052135A (en)Method for providing documentation service based on block editor, server and computer program thereof
CN105718434A (en)Natural language formula editing method and system
US9645798B1 (en)Using program code to generate help information, and using help information to generate program code
CN116009849B (en)Graphic interface display method and device based on visual programming platform
CN116009863B (en)Front-end page rendering method, device and storage medium
US9311059B2 (en)Software development tool that provides context-based data schema code hinting
US20140282477A1 (en)Automatic updating of data in application programs
WO2005098660A1 (en)Document processing device and document processing method
WO2006046668A1 (en)Document processing device and document processing method

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C12Rejection of a patent application after its publication
RJ01Rejection of invention patent application after publication

Application publication date:20120815


[8]ページ先頭

©2009-2025 Movatter.jp