This file contains information about the following subjects:
The locale classes consist of ILocaleKey, which gives you access to the resources associated with a particular locale, and ILocaleKeyIterator, which lets you iterate through the locally installed locales.
This figure illustrates how locales can be grouped by language (as for English) or by geographical location (as for Switzerland):

The primary class you use to work with locales is ILocaleKey. ILocaleKey acts as an identifier for a specific locale and is used as a parameter for functions that create a particular type of localizable object. For example, the ICollation::createCollation function takes an ILocaleKey object that indicates what language the collation should reflect. On the other hand, the ILocaleKey::displayName function lets you display the locale name in any language for which a name is provided. Each type of international object should provide a displayName function, such as ICollation::displayName.
When you need a localized object, create an ILocaleKey object to define the locale with which to associate the object. A given object can be associated with more than one locale. Thus, a collation object for English could be associated with many--or even all--English-speaking locales (United States, Canada, United Kingdom, Jamaica, and so on). The set of objects associated with a locale can be open-ended; you are free to associate new objects with the locale.
Use ILocaleKey to identify the locale for which you want to access localized resources. You can use ILocaleKey to specify a particular locale (such as U.S. English) or to specify the default locale on the current host. ILocaleKey gives you access to both host-specific and portable objects associated with a given locale.
ILocaleKey supports two ways to describe a specific locale:
unsigned long
value) for the current platform. For example, on Win32
platforms the locale identifier for United States English
is 0x0409. When you use a locale key to obtain an object for a given locale, the system does the following:
This figure shows the interface for ILocaleKey:

Use ILocaleKeyIterator to iterate through the locales available on the current hosts. Because ILocaleKeyIterator iterates through currently installed locales (rather than all locales supported by the locale mechanism), it may not reflect the full set of supported locales. You do not need to initialize an ILocaleKeyIterator object--when constructed, it automatically references the first locale key in the list.
This figure shows the interface for ILocaleKeyIterator:
const
pointer to the locale key referenced by the iterator. true if the
iterator references the last locale key. ![]()
Getting a Key for a Locale
Getting an Object from the
Current Default Locale
Getting an Object from a Specific
Locale
Iterating Through Available
Locales