[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
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:

You can also use the setmaps command to set the code set map of a terminal.

For additional explanation, see National Language Support Overview in the AIX Version 4.3 System Management Concepts: Operating System and Devices.

Changing the Default Language Environment

To designate the default locale, which is a language-territory-code-set combination, set the LANG environment variable (the "LANG = <name>" string in the /etc/environment file). 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 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

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