System Administration Guide: Basic Administration

Locale Variables

The LANG and LC environment variables specify the locale-specific conversions and conventions for the shell. These conversions and conventions include time zones, collation orders, and formats of dates, time, currency, and numbers. In addition, you can use the stty command in a user initialization file to indicate whether the terminal session will support multibyte characters.

The LANG variable sets all possible conversions and conventions for the given locale. You can set various aspects of localization separately through these LC variables: LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_NUMERIC, LC_MONETARY, and LC_TIME.

The following table describes some of the values for the LANG and LC environment variables.

Table 4–21 Values for LANG and LC Variables

Value 

Locale 

de_DE.ISO8859-1

German

en_US.UTF-8

American English (UTF-8)

es_ES.ISO8859-1

Spanish

fr_FR.ISO8859-1

French

it_IT.ISO8859-1

Italian

ja_JP.eucJP

Japanese (EUC)

ko_KR.EUC

Korean (EUC)

sv_SE.ISO8859-1

Swedish

zh_CN.EUC

Simplified Chinese (EUC)

zh_TW.EUC

Traditional Chinese (EUC)

For more information on supported locales, see the International Language Environments Guide.


Example 4–1 Setting the Locale Using the LANG Variables

The following examples show how to set the locale by using the LANG environment variables. In a C-shell user initialization file, you would add the following:


setenv LANG de_DE.ISO8859-1

In a Bourne-shell or Korn-shell user initialization file, you would add the following:


LANG=de_DE.ISO8859-1; export LANG