[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
System Management Concepts: Operating System and Devices

Understanding Locale Environment Variables

National Language Support (NLS) uses several environment variables to influence the selection of locales. You can set the values of these variables to change search paths for locale information:

LANG Specifies the installation default locale.
Note: The LANG value is established at installation. (This is the locale every process will use unless the LC_* environment variables are set). The LANG environment variable can be changed by using the System Management Interface Tool (SMIT). The C and POSIX locales offer the best performance.
LC_ALL Overrides the value of the LANG environment variable and the values of any other LC_* environment variables.
LC_COLLATE Specifies the locale to use for LC_COLLATE category information. The LC_COLLATE category determines character-collation or string-collation rules governing the behavior of ranges, equivalence classes, and multicharacter collating elements.
LC_CTYPE Specifies the locale to use for LC_CTYPE category information. The LC_CTYPE category determines character handling rules governing the interpretation of sequences of bytes of text data characters (that is, single-byte versus multibyte characters), the classification of characters (for example, alpha, digit, and so on), and the behavior of character classes.
LC__FASTMSG Specifies that default messages should be used for the C and POSIX locales and that NLSPATH will be ignored when LC__FASTMSG is set to true; otherwise, POSIX compliant message handling will be performed. The default value will be LC__FASTMSG=true in /etc/environment.
LC_MESSAGES Specifies the locale to use for LC_MESSAGES category information. The LC_MESSAGES category determines rules governing affirmative and negative responses and the locale (language) for messages and menus.
LC_MONETARY Specifies the locale to use for LC_MONETARY category information. The LC_MONETARY category determines the rules governing monetary-related formatting.
LC_NUMERIC Specifies the locale to use for LC_NUMERIC category information. The LC_NUMERIC category determines the rules governing nonmonetary numeric formatting.
LC_TIME Specifies the locale to use for LC_TIME category information. The LC_TIME category determines the rules governing date and time formatting.
LOCPATH Specifies the search path for localized information, including binary locale files, input methods, and code-set converters.
Note: All setuid and setgid programs ignore the LOCPATH environment variable.
NLSPATH Specifies the search path for locating message catalog files. This environment variable is used by the Message Facility component of the NLS subsystem. Refer to the catopen Subroutine for more information about expected format of the NLSPATH variable.

The environment variables that affect locale selection can be grouped into three priority classes:

Locale Environment Variable Hierarchy
Priority Class Environment Variables
High LC_ALL

LC_COLLATE

LC_CTYPE
Medium LC_MESSAGES

LC_MONETARY

LC_NUMERIC

LC_TIME
Low LANG

The behavior of an internationalized program is affected by the locale environment variables in the following manner:


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]