![]() |
|
||||||||||||
![]() | |||||||||||||
|
Call Us Toll-Free (877) 256-0328 Outside USA 1 - (201) 505-0430
|
Trail: Internationalization
Lesson: Introduction
Home Page
>
Internationalization
>
Introduction
Checklist
Many programs are not internationalized when first written. These programs may have started as prototypes, or perhaps they were not intended for international distribution. If you must internationalize an existing program, take the following steps: Identify Culturally Dependent DataText messages are the most obvious form of data that varies with culture. However, other types of data may vary with region or language. The following list contains examples of culturally dependent data: Isolate Translatable Text in Resource BundlesTranslation is costly. You can help reduce costs by isolating the text that must be translated in Deal with Compound MessagesCompound messages contain variable data. In the message "The disk contains 1100 files." the integer 1100 may vary. This message is difficult to translate because the position of the integer in the sentence is not the same in all languages. The following message is not translatable, because the order of the sentence elements is hardcoded by concatenation:Whenever possible, you should avoid constructing compound messages, because they are difficult to translate. However, if your application requires compound messages, you can handle them with the techniques described in the section Messages. Format Numbers and CurrenciesIf your application displays numbers and currencies, you must format them in a locale-independent manner. The following code is not yet internationalized, because it will not display the number correctly in all countries:Double amount; TextField amountField; ... String displayAmount = amount.toString(); amountField.setText(displayAmount); Format Dates and TimesDate and time formats differ with region and language. If your code contains statements like the following, you need to change it:Date currentDate = new Date(); TextField dateField; ... String dateString = currentDate.toString(); dateField.setText(dateString); Use Unicode Character PropertiesThe following code tries to verify that a character is a letter:Watch out for code like this, because it won't work with languages other than English. For example, the Compare Strings ProperlyWhen sorting text you often compare strings. If the text is displayed, you shouldn't use the comparison methods of the Convert Non-Unicode Text
Previous page: Internationalizing the Sample Program
Next page: Setting the Locale |
JSP
Servlets
Tomcat
mysql
Java
JSP
Servlets
Tomcat
mysql
Java
JSP
Servlets
Tomcat
mysql
Java
JSP
Servlets
Tomcat
mysql
Java
JSP at JSP.aldenWEBhosting.com
Servlets at servlets.aldenWEBhosting.com
Tomcat at Tomcat.aldenWEBhosting.com
mysql at mysql.aldenWEBhosting.com
Java at Java.aldenWEBhosting.com
Web Hosts Portal
Web Links
Web Links
Web Hosting
JSP Solutions Web Links
JSP Solutions Web Hosting
Servlets Solutions Web Links
Servlets Solutions Web Hosting
Web Links
Web Links
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
jsp hosting
servlets hosting
web hosting
web sites designed
cheap web hosting
web site hosting
myspace web hosting