Getting an Object from the Current Default Locale

Many classes that are instantiated into localized objects provide static functions for creating the object for a particular locale. To get the object for the current default locale, you can either:

  1. Call the localizable object's create function without specifying a locale.
  2. Call the static function ILocaleKey::defaultLocale to get a locale key for the current default and pass that key to the localizable object's create function.

For example:

// Call the createCollation function

ICollation *coll = ICollation::createCollation();

or

// Create a key for the current default locale

ILocaleKey defaultKey(ILocaleKey::defaultLocale());

// Call the createCollation function

ICollation *coll = ICollation::createCollation(defaultKey);


Overview of Locale Classes
Locale Names