Chapter 24. Internationalization

Introduction

The audience for almost all web sites is global. Many sites have at least a subset of content that must be adapted to the language and nationality of their visitors, so that the visitor’s browser formats numbers and dates properly and translates text into the proper language. An obvious example is a product documentation or help web site. What if most of your customers or viewers for this product speak a language other than English? Java provides tools that allow web developers to internationalize their sites.

Before I show these tools, let’s first explain a few terms that always appear in discussions of web site translation.

  1. Internationalization, or i18n in its abbreviated version, means enabling a web site or other Java program to provide different versions of content translated into the visitor’s language or nationality. This term basically means making your site global.

  2. Localization, or l10n , means adding resources to a web site to adapt it to a particular geographical or cultural region. An example of l10n is adding Korean language translations to a web site. The web developers who have this responsibility are often referred to as localizers .

  3. A locale is a particular cultural or geographical region. It is usually referred to as a language symbol followed by a country symbol (separated by an underscore character), as in “en_US” for the English locale, “de_DE” for German speakers in Germany, or “de_CH” for Swiss-German speakers, ...

Get Java Servlet & JSP Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.