Accessing locales
TLocale provides the protocol for accessing any locale in the locale hierarchy. TLocale is a lightweight object that you can instantiate freely.
Any TLocale instance can be set to reference any locale that exists in the system's locale hierarchy. Use these TLocale member functions to retrieve a specific locale:
- GetRootLocale returns the root locale from the locale hierarchy.
- GetCurrentLocale returns the currently active locale.
- FindLocale retrieves a locale, given the locale's name, or returns False if it cannot find a locale by this name.
For example, this code gives you access to the current locale:
TLocale currentLocale;
TLocale::GetCurrentLocale(currentLocale);
TLocale also provides these functions to retrieve locales relative in the hierarchy to a particular locale:
- GetParentLocale returns the parent of the locale represented by this TLocale.
- GetChildLocales returns a collection of all the direct descendents of the locale represented by this TLocale.
[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