[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

System Management Guide: Operating System and Devices


Changing Your Locale

Changing the NLS Environment

You can customize your NLS environment. From the Users application of Web-based System Manager or from the Manage Language Environment screen in SMIT, you can:

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 5L Version 5.1 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, by typing:

    vi gwm.src
    change d_fmt "%d%m%y" to d_fmt "%m-%d-%y"
    
  3. Compile the locale definition source file, by typing:

    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. Type:

    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, by typing:

    export LC_TIME=gwm
    


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]