Previous Section  < Day Day Up >  Next Section

Chapter 11. Internationalization

Developing an application that caters to the needs of users from different parts of the world requires two related processes, known as internationalization and localization. Internationalization refers to preparing an application by identifying everything that will vary in different geographical regions and providing the means to use different versions of all these items, instead of hardcoded values. Examples of such items include labels and messages, online help texts, graphics, format of dates, times and numbers, currencies, measurements, and sometimes even the page layouts and colors. Many people use the abbreviation i18n for the word "internationalization," because the word is spelled with the letter I followed by 18 characters and an N—i18n is much easier to type.

An application that has been internationalized can be localized for different regions without changing any code. Localization means making the application messages, help texts, graphics, and so forth—as well as rules for formatting dates/times and numbers—for one or more regions available to the internationalized application. Localization is sometimes abbreviated l10n, following the same logic as the i18n abbreviation. Adding support for a new region is as simple as installing new localized resources.

The Java core libraries include a number of tools to make it easy to develop internationalized applications and create localized resources, and JSF builds on these features. In this chapter, we first look at how to use the core libraries and the JSF features to internationalize part of the sample application. Dealing with languages containing other characters than those used in Western languages can be a bit tricky, but I'll show you how to do it for JSF in the last section of the chapter.

    Previous Section  < Day Day Up >  Next Section