Locale class architecture

This figure shows the classes you need to use the locale mechanism.


Each TLocale instance represents a particular locale. TLocale gives you access to the collection of objects that should be used in the corresponding geographic region. The TLocale representing a region can also be used as a key for indicating which archived presentation or name a program should use.

TLocaleItem represents a single object in a locale and allows you to retrieve the object that the item refers to--for example, a typing configuration, date format, or font preference.

TLocalizableName encapsulates an internal name, or programmer ID, and a set of localized names for a locale object or for an object within a locale. You can use this class to access the localized name for a given locale.

TLocaleItemIterator lets you iterate over the items in a particular locale. Create a TLocaleItemIterator using the TLocale::CreateLocaleItemIterator function. The iterator returns the name of each item in that locale.

The locale classes also use the class TLocaleException, derived from TStandardException, to issue exceptions. TLocaleException defines two exception conditions--kInvalidLocale, issued when a caller tries to access an invalid locale, and the default condition kDefaultReason.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker