dropdown menu

EXTRA - locale


A locale is the part of a user's environment that brings together information about how to handle data that is specific to the end user's particular country, language, or territory. The locale is typically installed as part of the operating system. (Data formats, Dates, Numbers...)


To check your current locale settings, use the command locale. The output will indicate the current system locale in the form of ENV_VARIABLE="locale". For example:
# locale
LANG=C
LC_COLLATE="C"
LC_CTYPE="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_MESSAGES="C"
LC_ALL=

The above output indicates that the system locale "C" is currently being used.
The 'C' locale is defined as the "default" locale for applications, meaning that their strings are displayed as written in the initial code (without passing through a translation lookup).


To see a listing of all locales on the system, the locale -a command can be used. Before changing the locale value to en_US, be certain that the en_US locale is installed. For example:
# locale -a
C
POSIX
en_US
en_BE.8859-15
en_US.8859-15
en_US.ISO8859-1
en_BE
en_BE@euro

To change the locale setting, use the Manage Language Environment menu in SMIT, or edit the file /etc/environment and ensure that value LANG=en_US is set.

smitty -> System Environments -> Manage Language Environment

After rebooting the system, you should now see that the output of locale is as follows:
# locale
LANG=en_US
LC_COLLATE="en_US"
LC_CTYPE="en_US"
LC_MONETARY="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_MESSAGES="en_US"
LC_ALL=

5 comments:

Anonymous said...

Can't this be controlled on terminal session level, setting LC_ALL?

And: how do I install more locales, e.g. UTF-8 ones?

Pranith said...

Mount OS Cd , enter command smitty . under that - smitty -> System Environments -> Manage Language Environment- Add Additional Language Environments

Anonymous said...

Can't it be done from nim?

Unknown said...

You can do this from NIM server by exporting and mounting NFS share. INPUT device/directory for software will be NFS mount path.

Unknown said...

Does this requires a server reboot to take effect ?