Aspects of Internationalization in Java

By: Grenfel Emailed: 1600 times Printed: 2051 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

Internationalization involves many aspects of application development. Practically speaking, the primary goal behind all of these facets of development is to engineer a user interface -and its supporting infrastructure - that presents all UI information in a comprehensible way to local users. At a minimum, this effort involves supporting the following aspects of an application's execution:
  • Messaging— presentation of all visible text (message text, error text, UI component titles,
    prompts, and so forth) in the language of the appropriate runtime locale context.
  • Formatting policy— use of the correct locale-specific formats for all date, time, and
    numeric quantities.
  • Calendar and time zone policy— use of the correct calendar for the application's runtime
    locale.
  • String collation policy— use of an appropriate policy for string collation based on the
    locale's language.
  • General UI features, locale-sensitive images, icons, and colors— using images and colors
    that represent meaningful mnemonics to local users.

To support the foregoing features, an internationalized application must perform some dynamic configuration and information retrieval. Typically, an application will determine its locale context dynamically upon startup. Then, it will configure all the necessary runtime components—such as calendar objects, string collators, format objects and messaging components—that it needs to conform to the locale context requirements.

Messaging: Messaging is the presentation of all text data to the user in a language appropriate for the application's runtime locale context. It's the most visible area of i18n. Messaging involves the execution of the following steps at runtime:

• determination of the device locale environment
• loading of the application's localized resources
• dynamic lookup and retrieval of localized resources for UI display
• display of localized resources

Messaging is the area that best highlights the close relationship between i18n and l10n. To make an i18n implementation usable, an application must be localized. For each locale supported, the l10n process must produce a set of translated message strings that the application can access at runtime.

String Collation: String collation, also known as lexicographic sorting, is different from messaging. Nevertheless, the two areas are related in the sense that collation functions manipulate message text—text that the user sees.

Different languages define different rules for collation. A string collation facility must use a mechanism that understands the collation rules for the strings' language context. Practically, this includes an understanding of the details of the underlying character encoding set. Applications do string collation with no knowledge of the source of the string text. That is, a collation function doesn't retrieve collated strings from some repository of localized text. Instead, the program collates strings that have already been retrieved from a localized repository. Collation functions don't need to know the original location of the string. They only need a language context and a properly encoded string.

Date, Time, Numeric, and Monetary Value Formatting: Different locales use different formats for writing dates, times, and numbers. For instance, in Europe, people write dates, times and numbers differently from people in the United States. A French user writes date, time, and numeric quantities using the following forms.

25 décembre 2002
2002/12/25
25/12/2002
08.30
14.45
20.000,45 (twenty thousand, and forty-five hundredths)

In the United States, however, these same quantities would normally be written as follows.

December 25, 2002
12/25/2002
8:30 am
2:45 pm
20,000.45 (twenty thousand, and forty-five hundredths)

An internationalized program needs to format and display dates, times, and numbers appropriately for the runtime locale. Programs don't fetch these formatted quantities from some database; they calculate them dynamically in the same way that strings are collated dynamically.

Calendar and Time Zone Support: Calendars, although related to dates and times, define different characteristics and functionality. The difference is that calendars perform calculations that involve dates and times, whereas date and time objects support the formatting and display of those quantities.


Java Home | All Java Tutorials | Latest Java Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Grenfel
Verifying a Signed JAR File example
Bitwise and Bit Shift Operators example in Java
JavaBeans Basic Concepts
The Differences Between Simple and Classic Tags in JSP
Bitwise Logical Operators in C
DispatchAction in Struts
union example program in C
Comparison operators in JSP
Basics of Structures in C
register Variables in C
Struts and Tiles - Steps to use Struts and Tiles
The if else statement in C
Character Counting sample program in C
Installing JSF
cin.ignore() in C++

More Tutorials in Java
Update contents of a file within a jar file
Tomcat and httpd configured in port 8080 and 80
Java File
Java String
Count number of vowels, consonants and digits in a String in Java
Reverse a number in Java
Student marks calculation program in Java
Handling Fractions in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
MultiLevel Inheritance sample in Java
Multiple Inheritance sample in Java
Java program using Method Overriding
Java program to check if user input is an even number

More Latest News
Most Viewed Articles (in Java )
How to Send SMS using Java Program (full code sample included)
Method Overriding in Java
InetAddress Example program in Java
Recursion in java
Abstract classes in Java
How to use ArrayList in Java
XML and Java - Parsing XML using Java Tutorial
Vector example in Java
Using StringTokenizer in Java
How to use Iterator in Java
Method Overloading (function overloading) in Java
compareTo( ) in Java
Read from a COM port using Java program
FileReader and FileWriter example program in Java
wait(), notify() and notifyAll() in Java - A tutorial
Most Emailed Articles (in Java)
inheritance in Java
Creating Users and Passwords with Tomcat using tomcat-users.xml
interface Example in Java
Java program to display numbers from 1 to 10 on Applet
How to modify the objects using java classes
Using Parameters in JasperReports
What is a Java CLASSPATH and why you need it?
Java scripting embedded in HTML.
Executing Java Scripts
Recursion in java
The Basic Structure of a Simple Java program
Reverse a number in Java
Vector in Java - Sample Program
Java program to print prime numbers using Thread
Draw a bar chart in Java