[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 System Management Guide: Operating System and Devices

Changing Your Locale

Changing the NLS Environment

You can change the NLS environment using the Web-based System Manager Users application or the Manage Language Environment SMIT interface to:

In addition, you can use the setmaps command to set the code set map of a terminal.

Changing the Default Language Environment

The setting of the LANG environment variable (the "LANG = <name>" string in the /etc/environment file) designates the default locale, which is a language-territory-code-set combination. The default locale provides formats for default collation, character classification, case conversion, numeric and monetary formatting, date-and-time formatting, and affirmative or negative responses. The default locale includes reference to the code set.

Changing the Default Keyboard Mapping for the Next System Restart

If more than one code set is supported for a given language-territory combination, multiple low-function terminal (LFT) keyboard mappings exist. The selected keyboard mapping has to match the code set of the selected language environment.

Managing Fonts

Users can perform such tasks as selecting the active font and selecting the font to load for the next system restart. The selected font has to support the same code set as the selected language environment and LFT keyboard mapping.

Converting the Code Set of Message Catalogs

Message catalogs are shipped in one code set for each translated language-territory combination. The code set of the message catalog has to match the code set of the locale.

Converting the Code Set of Flat Text Files

User-defined flat files of one code set can be converted to another code set when appropriate (IBM-850 to ISO8859-1, for example).

Typical User Scenarios

There are several NLS-related scenarios some users may encounter on the system. This section lists common scenarios with suggested actions to be taken.

Changing the NLS Environment with the localedef Command

If a special locale is desired (that is, a locale different from any of those provided), take the following steps with a user ID that allows read or write permissions (for example, root):

  1. If you are using a locale source file named gwm, copy the provided locale source file that is closest to the desired locale to a file named gwm.src. This name cannot be the same as any previously defined locale. The system-defined locales are listed in Understanding Locale .
    cd /usr/lib/nls/loc
    cp en_GB.ISO8859-1.src gwm.src
  2. Edit the newly created locale source file to change the locale variables to the desired values:
    vi gwm.src
    change d_fmt "%d%m%y" to d_fmt "%m-%d-%y"
  3. Compile the locale definition source file:
    localedef -f ISO8859-1 -i gwm.src gwm
  4. Set the LOCPATH environment variable to the directory containing the new locale file. The default for LOCPATH is /usr/lib/nls/loc:
    LOCPATH=/usr/lib/nls/loc; export LOCPATH
    Note: All setuid and setgid programs ignore the LOCPATH environment variable.
  5. Set the corresponding environment variable or variables:
    export LC_TIME=gwm

[ Previous | Next | Contents | Glossary | Home | Search ]