Locales
From a geographical perspective, a locale is a place. From a software perspective, a locale is a set of information associated with a place. The locale information includes the name and identifier of the spoken language, sorting and collating requirements, currency usage, numeric display preferences, and text directionality (left-to-right or right-to-left, horizontal or vertical). This section provides the locale definition codes involved in the internationalisation process.
The locale information includes the language, country and variant codes. Depending on the locale, you can specify only the language code or country and/or variant code along with the language code.
Each locale specifies a resource bundle of localized text. For example, in fr_FR_EURO, fr is the French language code, FR is the country code and EURO indicates the use of Euro currency.
Locale Definition
A Locale represents a specific geographical, political, or cultural region. An operation is locale-sensitive if it requires a locale to perform its task. For example, displaying a date is a locale-sensitive operation format the date according to the customs/conventions of the user's native country, region, or culture.
The following table lists the arguments and their corresponding descriptions required by the constructors.
|
Argument |
Argument Name |
Description |
|---|---|---|
|
First |
ISO Language Code |
Indicates the lower-case two-letter codes defined by ISO-639. |
|
Second |
ISO Country Code |
Indicates the upper-case two-letter codes as defined by ISO-3166. |
|
Third |
Variant |
Indicates the variant codes to define the locale further. For example, European countries use the variant code EURO. |
The following table lists the locales configured for internationalisation. The format of the locale definition is LanguageCode_CountryCode_Variant (Available with ICU).
|
Locale Definition |
||||
|---|---|---|---|---|
|
af |
af_ZA ar |
ar_AE |
ar_BH |
ar_DZ |
|
ar_EG |
ar_IQ |
ar_JO |
ar_KW |
ar_LB |
|
ar_LY |
ar_MA |
ar_OM |
ar_QA |
ar_SA |
|
ar_SD |
ar_SY |
ar_TN |
ar_YE |
|
|
be |
be_BY |
bg |
bg_BG |
|
|
ca |
ca_ES |
ca_ES_EURO |
cs |
cs_CZ |
|
da |
da_DK |
de |
de_AT |
de_AT_EURO |
|
de_CH |
de_DE |
de_DE_EURO |
de_LU |
de_LU_EURO |
|
el |
el_GR |
en |
en_AU |
en_BE |
|
en_BW |
en_CA |
en_GB |
en_IE |
en_IE_EURO |
|
en_NZ |
en_SG |
en_US |
en_ZA |
en_ZW |
|
eo |
es |
es_AR |
es_BO |
es_CL |
|
es_CO |
es_CR |
es_DO |
es_EC |
es_ES |
|
es_ES_EURO |
es_GT |
es_HN |
es_MX |
es_NI |
|
es_PA |
es_PE |
es_PR |
es_PY |
es_SV |
|
es_US |
es_UY |
es_VE |
et |
et_EE |
|
eu |
eu_ES |
|
|
|
|
fa |
fa_IR |
fi |
fi_FI |
fi_FI_EURO |
|
fo |
fo_FO |
fr |
fr_BE |
fr_BE_EURO |
|
fr_CA |
fr_CH |
fr_FR |
fr_FR_EURO |
fr_LU |
|
fr_LU_EURO |
|
|
|
|
|
ga |
ga_IE |
gl |
gl_ES |
gv |
|
gv_GB |
|
|
|
|
|
he |
he_IL |
hi |
hi_IN |
hr |
|
hr_HR |
hu |
hu_HU |
|
|
|
id |
id_ID |
is |
is_IS |
it |
|
it_CH |
it_IT |
it_IT_EURO |
|
|
|
ja |
ja_JP |
|
|
|
|
kl |
kl_GL |
ko |
ko_KR |
kok |
|
kok_IN |
kw |
kw_GB |
|
|
|
lt |
lt_LT |
lv |
lv_LV |
|
|
mk |
mk_MK |
mr |
mr_IN |
mt |
|
mt_MT |
|
|
|
|
|
nl |
nl_BE |
nl_BE_EURO |
nl_NL |
nl_NL_EURO |
|
no |
no_NO |
no_NO_B |
no_NO_NY |
|
|
pl |
pl_PL |
pt |
pt_BR |
pt_PT |
|
pt_PT_EURO |
|
|
|
|
|
ro |
ro_RO |
ru |
ru_RU |
ru_UA |
|
sh |
sh_YU |
sk |
sk_SK |
sl |
|
sl_SI |
sq |
sq_AL |
sr |
sr_YU |
|
sv |
sv_FI |
sv_FI_AL |
sv_SE |
sw |
|
sw_KE |
sw_TZ |
|
|
|
|
ta |
ta_IN |
te |
te_IN |
th |
|
th_TH |
tr |
tr_TR |
|
|
|
uk |
uk_UA |
|
|
|
|
vi |
vi_VN |
|
|
|
|
zh |
zh_CN |
zh_HK |
zh_SG |
zh_TW |
The following table lists the language codes configured for internationalisation as defined by ISO Language Code.
|
ISO Language Codes |
|||
|---|---|---|---|
|
aa Afar |
ab Abkhazian |
af Afrikaans |
am Amharic |
|
ar Arabic |
as Assamese |
ay Aymara |
az Azerbaijani |
|
ba Bashkir |
be Byelorussian |
bg Bulgarian |
bh Bihari |
|
bi Bislama |
bn Bengali; Bangla |
bo Tibetan |
br Breton |
|
ca Catalan |
co Corsican |
cs Czech |
cy Welsh |
|
da Danish |
de German |
dz Bhutani |
el Greek |
|
en English |
eo Esperanto |
es Spanish |
et Estonian |
|
eu Basque |
fa Persian |
fi Finnish |
fj Fiji |
|
fo Faroese |
fr French |
fy Frisian |
ga Irish |
|
gd Scots; Gaelic |
gl Galician |
gn Guarani |
gu Gujarati |
|
ha Hausa |
he Hebrew (formerly iw) |
hi Hindi |
hr Croatian |
|
Hu Hungarian |
hy Armenian |
ia Interlingua |
id Indonesian (formerly in) |
|
Ie Interlingue |
ik Inupiak |
is Icelandic |
it Italian |
|
iu Inuktitut |
ja Japanese |
jw Javanese |
ka Georgian |
|
kk Kazakh |
kl Greenlandic |
km Cambodian |
kn Kannada |
|
ko Korean |
ks Kashmiri |
ku Kurdish |
ky Kirghiz |
|
la Latin |
ln Lingala |
lo Laothian |
lt Lithuanian |
|
lv Latvian; Lettish |
mg Malagasy |
mi Maori |
mk Macedonian |
|
Ml Malayalam |
mn Mongolian |
mo Moldavian |
mr Marathi |
|
ms Malay |
mt Maltese |
my Burmese |
na Nauru |
|
ne Nepali |
nl Dutch |
no Norwegian |
oc Occitan |
|
om (Afan) Oromo |
or Oriya |
pa Punjabi |
pl Polish |
|
ps Pashto, Pushto |
pt Portuguese |
qu Quechua |
rm Rhaeto-Romance |
|
rn Kirundi |
ro Romanian |
ru Russian |
rw Kinyarwanda |
|
sa Sanskrit |
sd Sindhi |
sg Sangho |
sh Serbo-Croatian |
|
si Sinhalese |
sk Slovak |
sl Slovenian |
sm Samoan |
|
sn Shona |
so Somali |
sq Albanian |
sr Serbian |
|
ss Siswati |
st Sesotho |
su Sundanese |
sv Swedish |
|
sw Swahili |
ta Tamil |
te Telugu |
tg Tajik |
|
th Thai |
ti Tigrinya |
tk Turkmen |
tl Tagalog |
|
tn Setswana |
to Tonga |
tr Turkish |
ts Tsonga |
|
tt Tatar |
tw Twi |
ug Uighur |
uk Ukrainian |
|
ur Urdu |
uz Uzbek |
vi Vietnamese |
vo Volapuk |
|
wo Wolof |
xh Xhosa |
yi Yiddish (formerly ji) |
yo Yoruba |
|
za Zhuang |
zh Chinese |
zu Zulu |
|
The following table lists the language codes configured for internationalisation as defined by ISO Country Code.
|
Country |
A 2 |
A 3 |
Number |
|---|---|---|---|
|
Afghanistan |
AF |
AFG |
004 |
|
Albania |
AL |
ALB |
008 |
|
Algeria |
DZ |
DZA |
012 |
|
American Samoa |
AS |
ASM |
016 |
|
Andorra |
AD |
AND |
020 |
|
Angola |
AO |
AGO |
024 |
|
Anguilla |
AI |
AIA |
660 |
|
Antarctica |
AQ |
ATA |
010 |
|
Antigua and Barbuda |
AG |
ATG |
028 |
|
Argentina |
AR |
ARG |
032 |
|
Armenia |
AM |
ARM |
051 |
|
Aruba |
AW |
ABW |
533 |
|
Australia |
AU |
AUS |
036 |
|
Austria |
AT |
AUT |
040 |
|
Azerbaijan |
AZ |
AZE |
031 |
|
Bahamas |
BS |
BHS |
044 |
|
Bahrain |
BH |
BHR |
048 |
|
Bangladesh |
BD |
BGD |
050 |
|
Barbados |
BB |
BRB |
052 |
|
Belarus |
BY |
BLR |
112 |
|
Belgium |
BE |
BEL |
056 |
|
Belize |
BZ |
BLZ |
084 |
|
Benin |
BJ |
BEN |
204 |
|
Bermuda |
BM |
BMU |
060 |
|
Bhutan |
BT |
BTN |
064 |
|
Bolivia |
BO |
BOL |
068 |
|
Bosnia and Herzegowina |
BA |
BIH |
070 |
|
Botswana |
BW |
BWA |
072 |
|
Bouvet Island |
BV |
BVT |
074 |
|
Brazil |
BR |
BRA |
076 |
|
British Indian Ocean Territory |
IO |
IOT |
086 |
|
Brunei Darussalam |
BN |
BRN |
096 |
|
Bulgaria |
BG |
BGR |
100 |
|
Burkina Faso |
BF |
BFA |
854 |
|
Burundi |
BI |
BDI |
108 |
|
Cambodia |
KH |
KHM |
116 |
|
Cameroon |
CM |
CMR |
120 |
|
Canada |
CA |
CAN |
124 |
|
Cape Verde |
CV |
CPV |
132 |
|
Cayman Islands |
KY |
CYM |
136 |
|
Central African Republic |
CF |
CAF |
140 |
|
Chad |
TD |
TCD |
148 |
|
Chile |
CL |
CHL |
152 |
|
China |
CN |
CHN |
156 |
|
Christmas Island |
CX |
CXR |
162 |
|
Cocos (Keeling) Islands |
CC |
CCK |
166 |
|
Colombia |
CO |
COL |
170 |
|
Comoros |
KM |
COM |
174 |
|
Congo |
CG |
COG |
178 |
|
Cook Islands |
CK |
COK |
184 |
|
Costa Rica |
CR |
CRI |
188 |
|
Cote D'ivoire |
CI |
CIV |
384 |
|
Croatia (local name: Hrvatska) |
HR |
HRV |
191 |
|
Cuba |
CU |
CUB |
192 |
|
Cyprus |
CY |
CYP |
196 |
|
Czech Republic |
CZ |
CZE |
203 |
|
Denmark |
DK |
DNK |
208 |
|
Djibouti |
DJ |
DJI |
262 |
|
Dominica |
DM |
DMA |
212 |
|
Dominican Republic |
DO |
DOM |
214 |
|
East Timor |
TP |
TMP |
626 |
|
Ecuador |
EC |
ECU |
218 |
|
Egypt |
EG |
EGY |
818 |
|
El Salvador |
SV |
SLV |
222 |
|
Equatorial Guinea |
GQ |
GNQ |
226 |
|
Eritrea |
ER |
ERI |
232 |
|
Estonia |
EE |
EST |
233 |
|
Ethiopia |
ET |
ETH |
231 |
|
Falkland Islands (Malvinas) |
FK |
FLK |
238 |
|
Faroe Islands |
FO |
FRO |
234 |
|
Fiji |
FJ |
FJI |
242 |
|
Finland |
FI |
FIN |
246 |
|
France |
FR |
FRA |
250 |
|
France, Metropolitan |
FX |
FXX |
249 |
|
French Guiana |
GF |
GUF |
254 |
|
French Polynesia |
PF |
PYF |
258 |
|
French Southern Territories |
TF |
ATF |
260 |
|
Gabon |
GA |
GAB |
266 |
|
Gambia |
GM |
GMB |
270 |
|
Georgia |
GE |
GEO |
268 |
|
Germany |
DE |
DEU |
276 |
|
Ghana |
GH |
GHA |
288 |
|
Gibraltar |
GI |
GIB |
292 |
|
Greece |
GR |
GRC |
300 |
|
Greenland |
GL |
GRL |
304 |
|
Grenada |
GD |
GRD |
308 |
|
Guadeloupe |
GP |
GLP |
312 |
|
Guam |
GU |
GUM |
316 |
|
Guatemala |
GT |
GTM |
320 |
|
Guinea |
GN |
GIN |
324 |
|
Guinea-Bissau |
GW |
GNB |
624 |
|
Guyana |
GY |
GUY |
328 |
|
Haiti |
HT |
HTI |
332 |
|
Heard and Mc Donald Islands |
HM |
HMD |
334 |
|
Honduras |
HN |
HND |
340 |
|
Hong Kong |
HK |
HKG |
344 |
|
Hungary |
HU |
HUN |
348 |
|
Iceland |
IS |
ISL |
352 |
|
India |
IN |
IND |
356 |
|
Indonesia |
ID |
IDN |
360 |
|
Iran (Islamic Republic of) |
IR |
IRN |
364 |
|
Iraq |
IQ |
IRQ |
368 |
|
Ireland |
IE |
IRL |
372 |
|
Israel |
IL |
ISR |
376 |
|
Italy |
IT |
ITA |
380 |
|
Jamaica |
JM |
JAM |
388 |
|
Japan |
JP |
JPN |
392 |
|
Jordan |
JO |
JOR |
400 |
|
Kazakhstan |
KZ |
KAZ |
398 |
|
Kenya |
KE |
KEN |
404 |
|
Kiribati |
KI |
KIR |
296 |
|
Korea, Democratic People's Republic of |
KP |
PRK |
408 |
|
Korea, Republic of |
KR |
KOR |
410 |
|
Kuwait |
KW |
KWT |
414 |
|
Kyrgyzstan |
KG |
KGZ |
417 |
|
Lao People's Democratic Republic |
LA |
LAO |
418 |
|
Latvia |
LV |
LVA |
428 |
|
Lebanon |
LB |
LBN |
422 |
|
Lesotho |
LS |
LSO |
426 |
|
Liberia |
LR |
LBR |
430 |
|
Libyan Arab Jamahiriya |
LY |
LBY |
434 |
|
Liechtenstein |
LI |
LIE |
438 |
|
Lithuania |
LT |
LTU |
440 |
|
Luxembourg |
LU |
LUX |
442 |
|
Macau |
MO |
MAC |
446 |
|
Macedonia, the former Yugoslav Republic of |
MK |
MKD |
807 |
|
Madagascar |
MG |
MDG |
450 |
|
Malawi |
MW |
MWI |
454 |
|
Malaysia |
MY |
MYS |
458 |
|
Maldives |
MV |
MDV |
462 |
|
Mali |
ML |
MLI |
466 |
|
Malta |
MT |
MLT |
470 |
|
Marshall Islands |
MH |
MHL |
584 |
|
Martinique |
MQ |
MTQ |
474 |
|
Mauritania |
MR |
MRT |
478 |
|
Mauritius |
MU |
MUS |
480 |
|
Mayotte |
YT |
MYT |
175 |
|
Mexico |
MX |
MEX |
484 |
|
Micronesia, Federated States of |
FM |
FSM |
583 |
|
Moldova, Republic of |
MD |
MDA |
498 |
|
Monaco |
MC |
MCO |
492 |
|
Mongolia |
MN |
MNG |
496 |
|
Montserrat |
MS |
MSR |
500 |
|
Morocco |
MA |
MAR |
504 |
|
Mozambique |
MZ |
MOZ |
508 |
|
Myanmar |
MM |
MMR |
104 |
|
Namibia |
NA |
NAM |
516 |
|
Nauru |
NR |
NRU |
520 |
|
Nepal |
NP |
NPL |
524 |
|
Netherlands |
NL |
NLD |
528 |
|
Netherlands Antilles |
AN |
ANT |
530 |
|
New Caledonia |
NC |
NCL |
540 |
|
New Zealand |
NZ |
NZL |
554 |
|
Nicaragua |
NI |
NIC |
558 |
|
Niger |
NE |
NER |
562 |
|
Nigeria |
NG |
NGA |
566 |
|
Niue |
NU |
NIU |
570 |
|
Norfolk Island |
NF |
NFK |
574 |
|
Northern Mariana Islands |
MP |
MNP |
580 |
|
Norway |
NO |
NOR |
578 |
|
Oman |
OM |
OMN |
512 |
|
Pakistan |
PK |
PAK |
586 |
|
Palau |
PW |
PLW |
585 |
|
Panama |
PA |
PAN |
591 |
|
Papua New Guinea |
PG |
PNG |
598 |
|
Paraguay |
PY |
PRY |
600 |
|
Peru |
PE |
PER |
604 |
|
Philippines |
PH |
PHL |
608 |
|
Pitcairn |
PN |
PCN |
612 |
|
Poland |
PL |
POL |
616 |
|
Portugal |
PT |
PRT |
620 |
|
Puerto Rico |
PR |
PRI |
630 |
|
Qatar |
QA |
QAT |
634 |
|
Reunion |
RE |
REU |
638 |
|
Romania |
RO |
ROM |
642 |
|
Russian Federation |
RU |
RUS |
643 |
|
Rwanda |
RW |
RWA |
646 |
|
Saint Kitts and Nevis |
KN |
KNA |
659 |
|
Saint Lucia |
LC |
LCA |
662 |
|
Saint Vincent and The Grenadines |
VC |
VCT |
670 |
|
Samoa |
WS |
WSM |
882 |
|
San Marino |
SM |
SMR |
674 |
|
Sao Tome and Principe |
ST |
STP |
678 |
|
Saudi Arabia |
SA |
SAU |
682 |
|
Senegal |
SN |
SEN |
686 |
|
Seychelles |
SC |
SYC |
690 |
|
Sierra Leone |
SL |
SLE |
694 |
|
Singapore |
SG |
SGP |
702 |
|
Slovakia (Slovak Republic) |
SK |
SVK |
703 |
|
Slovenia |
SI |
SVN |
705 |
|
Solomon Islands |
SB |
SLB |
090 |
|
Somalia |
SO |
SOM |
706 |
|
South Africa |
ZA |
ZAF |
710 |
|
South Georgia and South Sandwich Islands |
GS |
SGS |
239 |
|
Spain |
ES |
ESP |
724 |
|
Sri Lanka |
LK |
LKA |
144 |
|
St. Helena |
SH |
SHN |
654 |
|
St. Pierre and Miquelon |
PM |
SPM |
666 |
|
Sudan |
SD |
SDN |
736 |
|
Suriname |
SR |
SUR |
740 |
|
Svalbard and Jan Mayen islands |
SJ |
SJM |
744 |
|
Swaziland |
SZ |
SWZ |
748 |
|
Sweden |
SE |
SWE |
752 |
|
Switzerland |
CH |
CHE |
756 |
|
Syrian Arab Republic |
SY |
SYR |
760 |
|
Taiwan |
TW |
TWN |
158 |
|
Tajikistan |
TJ |
TJK |
762 |
|
Tanzania, United Republic of |
TZ |
TZA |
834 |
|
Thailand |
TH |
THA |
764 |
|
Togo |
TG |
TGO |
768 |
|
Tokelau |
TK |
TKL |
772 |
|
Tonga |
TO |
TON |
776 |
|
Trinidad and Tobago |
TT |
TTO |
780 |
|
Tunisia |
TN |
TUN |
788 |
|
Turkey |
TR |
TUR |
792 |
|
Turkmenistan |
TM |
TKM |
795 |
|
Turks and Caicos Islands |
TC |
TCA |
796 |
|
Tuvalu |
TV |
TUV |
798 |
|
Uganda |
UG |
UGA |
800 |
|
Ukraine |
UA |
UKR |
804 |
|
United Arab Emirates |
AE |
ARE |
784 |
|
United Kingdom |
GB |
GBR |
826 |
|
United States |
US |
USA |
840 |
|
United States Minor Outlying Islands |
UM |
UMI |
581 |
|
Uruguay |
UY |
URY |
858 |
|
Uzbekistan |
UZ |
UZB |
860 |
|
Vanuatu |
VU |
VUT |
548 |
|
Vatican City State (Holy See) |
VA |
VAT |
336 |
|
Venezuela |
VE |
VEN |
862 |
|
Vietnam |
VN |
VNM |
704 |
|
Virgin Islands (British) |
VG |
VGB |
092 |
|
Virgin Islands (U.S.) |
VI |
VIR |
850 |
|
Wallis and Futuna Islands |
WF |
WLF |
876 |
|
Western Sahara |
EH |
ESH |
732 |
|
Yemen |
YE |
YEM |
887 |
|
Yugoslavia |
YU |
YUG |
891 |
|
Zaire |
ZR |
ZAR |
180 |
|
Zambia |
ZM |
ZMB |
894 |
|
Zimbabwe |
ZW |
ZWE |
716 |
In this topic