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

System Management Concepts: Operating System and Devices

Understanding Locale

A locale is made up of the language, territory, and code set combination used to identify a set of language conventions. These conventions include information on collation, case conversion, and character classification, the language of message catalogs, date-and-time representation, the monetary symbol, and numeric representation.

Locale information contained in locale definition source files must first be converted into a locale database by the localedef command. The setlocale subroutine can then access this information and set locale information for applications. To deal with locale data in a logical manner, locale definition source files are divided into six categories (see Understanding Locale Categories). Each category contains a specific aspect of the locale data. The LC_* environment variables and the LANG environment variable can be used in specifying the desired locale.

Locale Naming Conventions

Each locale is named by its locale definition source file name. These files are named for the language, territory, and code set information they describe. The following format is used for naming a locale definition file:


For example, the locale for the Danish language spoken in Denmark using the ISO8859-1 code set is da_DK.ISO8859-1. The da stands for the Danish language and the DK stands for Denmark. The short form of da_DK is sufficient to indicate this locale. The same language and territory using the IBM-850 code set is indicated by either Da_DK.IBM-850 or the short form Da_DK.

System-defined locale definition files are provided to show the format of locale categories and their keywords. The /usr/lib/nls/loc directory contains the locale definition files for system-defined locales. The C, or POSIX, locale defines the ANSI C-defined standard locale inherited by all processes at startup time. The other system-defined locale definition source files are:

Locale Language Country Code Set
Ar_AA Arabic Arabic Countries IBM-1046
ar_AA Arabic Arabic Countries IS08859-6
ar_AE Arabic United Arab Emirates ISO8859-6
ar_BH Arabic Bahrain ISO8859-6
ar_EG Arabic Egypt ISO8859-6
ar_JO Arabic Jordan ISO8859-6
ar_KW Arabic Kuwait ISO8859-6
ar_LB Arabic Lebanon ISO8859-6
ar_OM Arabic Oman ISO8859-6
ar_QA Arabic Qatar ISO8859-6
ar_SA Arabic Saudi Arabia ISO8859-6
ar_SY Arabic Syria ISO8859-6
ar_TN Arabic Tunisia ISO8859-6
be_BY Byelorussian Belarus ISO8859-5
bg_BG Bulgarian Bulgaria ISO8859-5
ca_ES Catalan Spain IS08859-1
ca_ES Catalan Spain ISO8859-15
cs_CZ Czech Czech Republic ISO8859-2
Da_DK Danish Denmark IBM-850
da_DK Danish Denmark ISO8859-1
da_DK Danish Denmark ISO8859-15
de_AT German Austria ISO8859-15
De_CH German Switzerland IBM-850
de_CH German Switzerland ISO8859-1
de_CH German Switzerland ISO8859-15
De_DE German Germany IBM-850
de_DE German Germany ISO8859-1
de_DE German Germany ISO8859-15
de_LU German Luxembourg ISO8859-15
el_GR Greek Greece ISO8859-7
en_AU English Australia ISO8859-15
en_BE English Belgium ISO8859-15
en_CA English Canada ISO8859-15
En_GB English Great Britain IBM-850
en_GB English Great Britain ISO8859-1
en_GB English Great Britain ISO8859-15
en_IE English Ireland ISO8859-15
en_IN English India ISO8859-15
en_NZ English New Zealand ISO8859-15
En_US English United States IBM-850
en_US English United States ISO8859-1
en_US English United States ISO8859-15
en_ZA English South Africa ISO8859-15
es_AR Spanish Argentina ISO8859-15
es_CL Spanish Chile ISO8859-15
es_CO Spanish Columbia ISO8859-15
Es_ES Spanish Spain IBM-850
es_ES Spanish Spain ISO8859-1
es_ES Spanish Spain ISO8859-15
es_MX Spanish Mexico ISO8859-15
es_PE Spanish Peru ISO8859-15
es_PR Spanish Puerto Rico ISO8859-15
es_UY Spanish Uruguay ISO8859-15
es_VE Spanish Venezuela ISO8859-15
Et_EE Estonian Estonia IBM-922
ET_EE Estonian Estonia UTF-8
Fi_FI Finnish Finland IBM-850
fi_FI Finnish Finland ISO8859-1
fi_FI Finnish Finland ISO8859-15
Fr_BE French Belgium IBM-850
fr_BE French Belgium ISO8859-1
fr_BE French Belgium ISO8859-15
Fr_CA French Canada IBM-850
fr_CA French Canada ISO8859-1
fr_CA French Canada ISO8859-15
Fr_FR French France IBM-850
fr_FR French France ISO8859-1
fr_FR French France ISO8859-15
fr_LU French Luxembourg ISO8859-15
Fr_CH French Switzerland IBM-850
fr_CH French Switzerland ISO8859-1
fr_CH French Switzerland ISO8859-15
HI_IN Hindi India UTF-8
hr_HR Croatian Croatia ISO8859-2
hu_HU Hungarian Hungary ISO8859-2
Is_IS Icelandic Iceland IBM-850
is_IS Icelandic Iceland ISO8859-1
is_IS Icelandic Iceland ISO8859-15
it_CH Italian Switzerland ISO8859-15
It_IT Italian Italy IBM-850
it_IT Italian Italy ISO8859-1
it_IT Italian Italy ISO8859-15
lw_IL Hebrew Israel IBM-856
iw_IL Hebrew Israel ISO8859-8
Ja_JP Japanese Japan IBM-943
ja_JP Japanese Japan IBM-eucJP
ko_KR Korean Korea IBM-eucKR
Lt_LT Lithuanian Lithuania IBM-921
LT_LT Lithuanian Lithuania UTF-8
Lv_LV Latvian Latvia IBM-921
LV_LV Latvian Latvia UTF-8
mk_MK Macedonian Former Yugoslav Republic of Macedonia ISO8859-5
Nl_BE Dutch Belgium IBM-850
nl_BE Dutch Belgium ISO8859-1
nl_BE Dutch Belgium ISO8859-15
Nl_NL Dutch Netherlands IBM-850
nl_NL Dutch Netherlands ISO8859-1
nl_NL Dutch Netherlands ISO8859-15
No_NO Norwegian Norway IBM-850
no_NO Norwegian Norway ISO8859-1
no_NO Norwegian Norway ISO8859-15
pl_PL Polish Poland ISO8859-2
pt_BR Portuguese Brazil ISO8859-1
pt_BR Portuguese Brazil ISO8859-15
Pt_PT Portuguese Portugal IBM-850
pt_PT Portuguese Portugal ISO8859-1
pt_PT Portuguese Portugal ISO8859-15
ro_RO Romanian Romania ISO8859-2
ru_RU Russian Russia ISO8859-5
sh_SP Serbian (Latin) Yugoslavia ISO8859-2
sh_YU Serbian (Latin) Yugoslavia ISO8859-2
sl_SI Slovene Slovenia ISO8859-2
sk_SK Slovak Slovakia ISO8859-2
sq_AL Albanian Albania ISO8859-1
sq_AL Albanian Albania ISO8859-15
sr_SP Serbian (Cyrillic) Yugoslavia ISO8859-5
sr_YU Serbian (Cyrillic) Yugoslavia ISO8859-5
Sv_SE Swedish Sweden IBM-850
sv_SE Swedish Sweden ISO8859-1
sv_SE Swedish Sweden ISO8859-15
th_TH Thai Thailand TIS-620
TH_TH Thai Thailand UTF-8
tr_TR Turkish Turkey ISO8859-9
Uk_UA Ukrainian Ukraine IBM-1124
Vi_VN Vietnamese Vietnam IBM-1129
VI_VN Vietnamese Vietnam UTF-8
Zh_CN Simplified Chinese People's Republic of China GBK
zh_CN Simplified Chinese People's Republic of China IBM-eucCN
ZH_CN Chinese People's Republic of China UTF-8
zh_TW Chinese (trad) Republic of China IBM-eucTW
Zh_TW Chinese (trad) Republic of China big5

Installation Default Locale

The installation default locale refers to the locale selected at installation. For example, when prompted, a user can specify the French language as spoken in Canada during the installation process. The code set automatically defaults to the ISO8859-1 code set. With this information, the system sets the value of the default locale, specified by the LANG environment variable, to fr_CA (fr for ISO8859-1 French and CA for Canada). Every process uses this locale unless the LC_* or LANG environment variables are modified. The default locale can be changed by using the Manage Language Environment menu in the System Management Interface Tool (SMIT) Overview.

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