Changes the language settings for system or user.
chlang [ -u UID | Uname ] [ -m MsgTransLst | -M ] Language
chlang [ -u UID | Uname ] -m MsgTransLst | -M
chlang -d [ -u UID | UName ]
The chlang command is a high-level shell command that changes the language settings for either the entire system or an individual user. If the effective id of the invoker is root and the -u option was not used, the language settings will be changed for the entire system in the /etc/environment file. If the effective id of the invoker is not root, or if the -u option was used, the language settings will be changed for an individual user in the user's .profile file.
When chlang is run with a language and no options, the LANG environment variable will be set to the language specified.
When chlang is run with the -m option, the LANG and NLSPATH environment variables will be set. In addition, the LC_MESSAGES variable will be set to the first value specified in the MsgTransLst of the -m flag if it is different from the Language parameter and the Language parameter has a system supplied translation available.
When chlang is run with the -d option, the NLSPATH environment variable will be removed.
Notes:
- Changes made to the NLS environment by chlang are not immediate when either /etc/environment or the user's .profile are modified. Changes to /etc/environment requires rebooting the sytsem. Changes to a user's .profile requires logging in again or running the .profile file.
- When modifying a user's configuration file, if the user uses the C shell (/usr/bin/csh) their .cshrc file will be modified rather than the .profile file.
0 | Indicates successful completion. |
>0 | Indicates an error occurred. |
chlang -u amcleod -m no_NO:sv_SE:en_US no_NOThe following settings would be made in the .profile for user amcleod. Because the first language in the message translation list is Norwegian, as is the Language parameter, LC_MESSAGES would not be set by chlang. If LC_MESSAGES had been set, it would be removed:
LANG=no_NO NLSPATH=/usr/lib/nls/msg/%L/%N: /usr/lib/nls/msg/no_NO/%N: /usr/lib/nls/msg/sv_SE/%N: /usr/lib/nls/msg/en_US/%N: /usr/lib/nls/msg/%L/%N.cat: /usr/lib/nls/msg/no_NO/%N.cat: /usr/lib/nls/msg/sv_SE/%N.cat: /usr/lib/nls/msg/en_US/%N.cat
chlang -m fr_CA:en_US fr_FRThe following settings would be made in the .profile file for the user invoking chlang. Because the first language in the message translation list is different from the cultural convention (locale), LC_MESSAGES is set by chlang.
LANG=fr_FR LC_MESSAGES=fr_CA NLSPATH=/usr/lib/nls/msg/%L/%N: /usr/lib/nls/msg/fr_CA/%N: /usr/lib/nls/msg/en_US/%N: /usr/lib/nls/msg/%L/%N.cat: /usr/lib/nls/msg/fr_CA/%N.cat: /usr/lib/nls/msg/en_US/%N.cat
chlang -m es_ES es_ESThe following settings would be made in the /etc/environment file.
LANG=es_ES NLSPATH=/usr/lib/nls/msg/%L/%N: /usr/lib/nls/msg/es_ES/%N: /usr/lib/nls/msg/%L/%N.cat: /usr/lib/nls/msg/es_ES/%N.cat
/usr/bin/chlang | Change language command |
/etc/environment | Specifies basic environment for all processes |
$HOME/.profile | Specifies environment for specific user needs |
The environment file, profile file format.
National Language Support Overview for System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.
Understanding Locale Environment Variables in AIX Version 4.3 System Management Guide: Operating System and Devices.