1. Technical Field
Embodiments of the present disclosure relate to software programming systems and methods, and particularly to a computing device and a method of supporting multi-languages for an application software of the computing device.
2. Description of Related Art
Application software systems may provide multiple languages, such as English, Spanish, Japanese or Chinese, for different language users to use. During design an application software system, one or more content may be embedded in program codes of an application software system, and may be displayed on user interfaces of the application software system using the different languages. However, programming designers must repeatedly design program codes of the application software system using different programming languages for the content displayed on the user interfaces of the application software system. Such design wastes computing resources and time, and increases complexity for maintenance of the program codes of the application software system.
The present disclosure, including the accompanying drawings, is illustrated by way of examples and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In the present disclosure, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a program language. In one embodiment, the program language may be Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage system. Some non-limiting examples of a non-transitory computer-readable medium include CDs, DVDs, flash memory, and hard disk drives.
The application software 11 may provide a plurality of user interfaces to display content on the display device 15 using different languages, such as English, Spanish, Japanese, or Chinese, for different users. The content may include, but is not limited to, menu items, icons, images, and letters. In one embodiment, the storage device 13 may be an internal storage system, such as a random access memory (RAM) for temporary storage of information, and/or a read only memory (ROM) for permanent storage of information. In some embodiments, the storage device 13 may also be an external storage system, such as an external hard disk, a storage card, or a data storage medium.
The searching module 101 is configured for searching content to be displayed on a user interface of the application software 11 from program codes of the application software 11. In one embodiment, the displayed content may include, but is not limited to, menu items, icons, images, and letters. The displayed content may be embedded in the program codes of the application software 11, and have an identification code programmed in the program codes of the application software 11. The searching module 101 searches the displayed content from the program codes of the application software 11 according to the identification code of the displayed content.
The recording module 102 is configured for recording a location of the displayed content located in the program codes of the application software 11. For example, the recording module 102 may add a marked tag in the identification code of the displayed content to record the location of the displayed content.
The translating module 103 is configured for translating the displayed content into translated content using a plurality of languages, generating a source document for the translated content corresponding to each of the languages, and storing all of the source documents into a program library of the application software 11. The languages include, but not limited to, English, Spanish, Japanese, and Chinese. Each of the source documents is stored in the program library in form of an extensible markup language (XML) format. For example, if the user uses the application software in Chinese, the translating module 103 translates the displayed content of the application software 11 into Chinese content, generates a Chinese source document for the Chinese source content, and then stores the Chinese source document into the program library.
The replacement module 104 is configured for loading a source document of the application software 11 from the program library according to a language selected from the user interface, replacing the displayed content with the translated content in the program codes of the application software 11 according to the location and the source document. The replacement module 104 is further configured for displaying on the user interface in form of the selected language on the display device 15 when the application software 11 is executed. For example, if the user selects Chinese to be used as a display language of the application software from the user interface, the replacement module 104 searches the Chinese source document from the program library, replaces the displayed content with the Chinese content using the Chinese source document, and displays the Chinese content on the user interface.
In step S301, the searching module 101 searches content to be displayed on a user interface of the application software 11 from program codes of the application software 11. In one embodiment, the displayed content may be, but is not limited to, menu items, icons, images, and letters. The displayed content may be embedded in the program codes of the application software 11, and have an identification code programmed in the program codes of the application software 11. The searching module 101 searches the displayed content from the program codes of the application software 11 according to the identification code of the displayed content.
In step S302, the recording module 102 records a location of the displayed content located in the program codes of the application software 11. For example, the recording module 102 may add a marked tag in the identification code of the displayed content to record the location of the displayed content.
In step S303, the translating module 103 translates the displayed content into translated content using a plurality of languages, generates a source document for the translated content corresponding to each of the languages, and stores all of the source document into a program library of the application software 11. The languages include, but not limited to, English, Spanish, Japanese, and Chinese. For example, if the user uses the application software in Chinese, the translating module 103 translates the displayed content of the application software 11 into Chinese content, generates a Chinese source document for the Chinese source content, and then stores the Chinese source document into the program library.
In step S304, the replacement module 104 loads a source document from the program library according to a language selected from the user interface, replaces the displayed content with the translated content in the program codes of the application software 11 according to the location and the source document. For example, if the user selects Chinese from the user interface, the replacement module 104 searches the Chinese source document from the program library, and replaces the displayed content with the Chinese content using the Chinese source document. When the application software 11 is executed, the replacement module 104 displays the user interface in form of the selected language on the display device 15.
Although certain disclosed embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201210059198.1 | Mar 2012 | CN | national |