A locale is a collection of archived resources appropriate for use in a specific region. These resources might include:
- Formatting information such as numbers, times, dates, or currency units
- Regional information such as a country identifier or a time zone
- Collating rules for the native language
- Styling information for text presentations such as font information for specific elements within an interface
- Typing configuration preferences
- Localized program interfaces for individual applications
Locales are organized in a hierarchy, descending from a single root locale. Just below the root level is a set of locales representing world languages. At the more granular levels, each locale represents a particular geographic region.
You can add any item required to produce the correct behavior for a particular locale. Each item can also have a complete set of localized names--that is, the same item can have multiple names in different languages so that it can be identified by an end user's preferred language.
End users select a particular locale as the default for their system. Your applications use the locale mechanism in the following ways to provide fully localizable applications:
- For language- or region-sensitive features, such as number formatting or text collating, use the needed resources from the current locale or from a user-specified locale, rather than support a specific language or region yourself. In this way, native language support is provided transparently for both the end user and the programmer.
- Archive and retrieve your program interfaces through locales. Localizers can create interfaces in additional languages without having to access the source code or recompile the program, and end users get a presentation in their preferred language whenever one is available.
Because of the hierarchical relationship of the set of locales, your program always has access to any available resources. If a particular item does not exist in the current locale, you can traverse the hierarchy until a suitable item is found. You can also write programs that allow use of multiple locales within the same document.
The CommonPoint system currently includes locales representing the United States, France, and Japan. A future release will also provide locales representing Canada, Germany, Great Britain, and Italy.
See Chapter 10, "Locales," for specific information on using locales.