Globalization will be embedded applications
Class: Junior
Shu Fang Rui (shufangrui@gmail.com), software engineers
Hu Wei Hong (nobleoliver@hotmail.com), software engineers
March 13, 2006
This article will introduce the embedded device solutions globalization two aspects - internationalization and localization. For international, to learn how to design the structure of code to support multiple languages. For localization, to learn how to customize the number, date, time and currency formats.
Internet for the rapid growth of cross-border enterprises to explore the opportunities for unpredictable, multi-language and multi-platform software products in the beginning of the success of global enterprises play an important role. Although the initial development based primarily on the Web in English, but it is understandable that people who do not speak English still like to see the use of its national language software interface, their own culture and national habits very sensitive. The result is, the growing demands of globalization inevitably falls on the e-commerce application procedures.
In the embedded device globalization support, developers face the challenge of how to make use of runtime support and limited resources to meet the different demands of globalization. Here, we will be in Java ™ 2 Platform, Micro Edition (J2ME) platform to address these challenges.
Generally speaking, the development of globalization to the application, need to take several steps, we will be divided into two groups these steps: internationalization and localization. Mean that the international application of the design and development should be flexible enough to meet the multilingual needs and cultural differences. In order to make possible the demand should be separated text data and code, and with the culture and customs of the relevant code and the basic business logic processing applications separation. Based on the application of this procedure is called globalization a single executable program (single executable). It can be run in all language versions, can call the corresponding text data as well as cultural and related code generation to meet the needs of the current user in the user interface.
Representatives of localization through the conversion of text data, design and culture-related configuration (such as name and address format), the generation of code to support globalization process. Can be converted to different areas according to the preservation and configuration files in different directories or folders, such globalization application can call them at any time. If you use a unified format text data, such as the OASIS XML Localization Interchange File Format (XLIFF), then this will greatly increase the efficiency of globalization.
a list of detailed information. Messages in three categories: setBundle (), getString () and getLocale (). Use setBundle (String propertyFileName) can be ResourceBundle class with the new document and the corresponding attribute linking the region. Using getString (String key), these will be returned to the region with the corresponding text.
2 set list on the label text, display the string "user ID."
Figure 1 demonstrates the user interface, and 3 in the list of categories demonstrated framework. For details, please refer to this article at the end of the download.
Table 1 compares each of the localization support.
Table 2 shows the different regions of the different digital format.
4 shows the list of how different areas according to the figures format.
5 will not use the list to be the result must be deleted formatted output in the box.
Table 2, the different regions of the digital format looks different. In the need to deal with the importation of the figures, the first need to verify it. Locale.SIMPLIFIED_CHINESE Locale.US and in the region in 1000 separator is "," (comma), the decimal point is "." (Sentence). And the region Locale.FRANCE, 1000 separation would become the "" (space), and then a decimal point "," (comma). While basic Java API provided some categories (such as Java.text.NumberFormat and Java.text.DecimalFormat) to do this work, but they can not ensure that the input string of the digital format effective. (6 through the analysis of a list of strings Java.text.NumberFormat shows the basic usage.)
list shows how to deal with seven regional fr_FR. Because fr_FR allow spaces, we will provide two functions to verify input.
First, the need to remove the spaces in the input string.
list of eight.
list of 10 shows to find things.
Figure 2 shows the relevant Chinese and the user interface.
10 in the list to amend section 3% DateFormat df = DateFormat.getDateInstance (DateFormat.LONG, Locale.FRANCE); can Figure 3 shown.
Table 3 shows the different languages DateTime format.
the list 11.
Table 4 shows the results of the above code.
List shows how to support 12 different regions of the currency format.
Table 5 shows the different regions of the output results.
13 shows how to list the monetary analysis.
13 list of the output should be 12345.08, and the same price variables.
![]()
![]()
![]()
HTTP ![]()
Information on the download ![]()
original English text.
Access to products and technologies
- Please use IBM trial software build your next development projects, and can be downloaded directly from the software developerWorks.
- Please download WebSphere Studio Device Developer, for building, testing and deployment of wireless devices running on J2ME applications to provide an integrated development environment (IDE).
- To use J2ME, from the Sun Microsystems Web site, download it.
Discuss
- Through participation in the developerWorks blogs join developerWorks community.

Shu Fang Rui is the Shanghai Jiaotong University (China) graduate. She wireless technology and Web services interested. In addition to travel, she also likes other sports.

Hu Wei Hong Zhejiang University (China) graduate. His interests include Java technology and dance.






