O'Reilly logo

PURE Java™ 2 by Kenneth Litwak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Basic Internationalization in a Java Application

Internationalization is usually referred to as i18n, because there are eighteen letters between the initial i and the final n. Here is a simple example of the type of code that might benefit from being internationalized:

public GUI()
     {
       Label nameLabel = new Label("Name");
        TextField greeting = new TextField("Hello");
        ...
        }

The user interface this type of code generates works fine in the U.S., but it might not work well in other countries where English is either not the primary language, such as Japan or France, or in a country where English has different idioms than in the U.S. It is important to be able to modify this English text to a more appropriate language for a given locale.

Note

To support ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required