[ Team LiB ] Previous Section Next Section

Hour 22. Internationalization

What You'll Learn in This Hour

  • How to change the page encoding

  • How to detect the browser's preferred locale

  • How to use locale-based text formatters

  • How to use resource bundles in Web pages

  • How to use the JSTL format actions

The Internet has had a huge impact on software development. Now developers and users from countries around the world can share information almost instantaneously. Oddly enough, developers rarely consider the fact that the people who use their software might be in another country. At least, this is often the case in the United States.

Java provides reasonable support for internationalization, some of which happens behind the scenes. When a Java program starts, it examines the locale configured in the operating system and sets up a default locale. Several Java classes use the locale for formatting dates and currencies. You can also define sets of resources, called resource bundles, which are locale-dependent. By confining your locale-specific data to resource bundles, you can support multiple locales in your programs without hard-coding every possible locale variation.

    [ Team LiB ] Previous Section Next Section