Book Image

Tapestry 5: Building Web Applications

Book Image

Tapestry 5: Building Web Applications

Overview of this book

Table of Contents (17 chapters)
Tapestry 5
Credits
About the Author
About the Reviewers
Preface
Foreword
Where to Go Next

Internationalization on the Java Platform


The Java platform has substantial support for internationalization. The foundation of this support is formed by two classes—Locale and ResourceBundle. The first of these classes, java.util.Locale, basically defines a language, but also can be narrowed down to a country (to distinguish, say, between British English, and American English) or even to a variant of the language (Chinese traditional versus Chinese simplified, as an example).

The Locale class has many useful constants that allow us to obtain a properly configured instance of it, like Locale.ENGLISH or Locale.GERMAN. We can also use a constructor of this class, which gives us more flexibility. For example, we can create new Locale("en", "UK") for British English, or new Locale("de", "CH") for Swiss German. You can find more information on the subject in Java API at http://java.sun.com website.

The second class, ResouceBundle, represents resources that are specific to a given Locale. However...