When UniCreateLocaleObject is passed an empty string in place of a locale identifier, a LocaleObject is created for the locale defined by the current environment. This is determined by a combination of the following environment variables:

LC_ALL
All locale settings.
LC_COLLATE
Collation settings.
LC_CTYPE
Character attributes (such as classification and case conversion).
LC_MESSAGES
Language used for output.
LC_MONETARY
Currency notation format and symbols.
LC_NUMERIC
Standard number formats.
LC_TIME
Time and date formats.
LANG
All locale settings not otherwise defined.

Each of these variables may be set to the name of an existing locale, in which case the corresponding conventions for that locale will be applied to the new locale.

The variable LC_ALL indicates all locale conventions, and has priority over all other variables (consequently, if LC_ALL is defined, all of the other variables will be disregarded). Conversely, the variable LANG has the lowest priority; it applies only to those locale conventions which have not been specified by any of the LC_* variables. Each of the other variables applies only to a specific subset of locale conventions, and has equal priority with the others.

Examples

The following environment values will set all locale conventions to "fr_CA":

    LANG=fr_CA

The following environment values will set conventions for date/time format to "en_UK", and all other locale conventions to "en_US":

    LANG=en_US
    LC_TIME=en_UK

The following environment values will set conventions for currency format to "en_NZ", conventions for number format to "en_UK", and all other locale conventions to "en_AU":

    LANG=en_AU
    LC_MONETARY=en_NZ
    LC_NUMERIC=en_UK

The following environment values will set all locale conventions to "ja_JP" (the setting for LC_NUMERIC is ignored):

    LC_ALL=ja_JP
    LC_NUMERIC=en_US


[Back] [Next]