Chapter 12. Conquer the world with l10n and i18n

 

In this chapter:

  • Supporting multiple languages with your web application
  • Is that the second of May or the fifth of February?

As part of the previous chapter, you learned how to restrict access and optionally render or hide components depending on the user’s session. In this chapter, we’ll look at how you can vary what is displayed to users depending on their locale. A locale represents a geographical, political, and/or cultural region. In computing, it usually groups a set of parameters that represent the user’s language and country. In Java, this is supported through the Locale object.

Localization refers to the adaptation of your application for one or more specific locales. A related term is internationalization, which encompasses all techniques that enable applications to be localized: being able to conveniently maintain different languages, handling different date and number formats, using the proper encoding type, and so forth. For the sake of simplicity, we’ll talk only about localization in this chapter, even if it sometimes would be more precise to talk about internationalization.

Note

Localization is commonly referred to as l10n, where 10 is the number of letters between l and n. In the same fashion, internationalization is often referred to as i18n.

Localizing components and applications can involve a large range of items. Typically, the most important are as follows:

12.1. Supporting multiple languages

12.2. Customizing resource loading

12.3. Localized conversions

12.4. Summary

sitemap