Developer's Guide to Internationalization
  Искать только в названиях книг
Загрузить это руководство в формате PDF

Language and Territory Names

A

Language and Territory

An internationalized program makes no assumptions about the language and format of text it is designed to handle. It must work equally well in any locale for data generated internally, text read from or written to files, and messages presented to the user.
To determine locale-specific conventions at run time, programs query system databases, installed in /usr/lib/locale, for cultural data. Applications should identify the proper locale using ISO standard names, presented in the next section.

Standard Locale Names

A locale name is always composed of a language name, sometimes with a territory name appended. SunSoft's list of accepted names for languages and territories follows in Table A-1 on page 66. Language names (all lower case) came from the ISO 639 standard. Territory names (all upper case) came from the ISO 3166 standard. Language is separated from territory by an underscore, and territory is optional.
Some languages have longer, more mnemonic names. For example, JLE accepts the locale name japanese, KLE accepts the locale name korean, HLE accepts the locale name tchinese, and CLE accepts the locale name chinese. The Solaris 2.5 system continues to support these long names.
Table A-1
LocaleLanguage/TerritoryLocaleLanguage/Territory
CDefault "C" localearArabic
bgBulgariancaCatalan
coCorsicancsCzech
cyWelshdaDanish
deGermande_CHSwiss German
elGreekenEnglish
en_UKU.K. Englishen_USU.S. English
eoEsperantoesSpanish
euBasquefaPersian
fiFinnishfrFrench
fr_BEBelgian Frenchfr_CACanadian French
fr_CHSwiss FrenchfyFrisian
gaIrishgdScots Gaelic
huHungarianisIcelandic
itItalianiwHebrew
jaJapanesejiYiddish
klGreenlandickoKorean
lvLatviannlDutch
noNorwegianplPolish
ptPortugueseroRomanian
ruRussianshSerbo-Croatian
skSlovaksrSerbian
svSwedishthThai
trTurkishzhChinese
zh_TWChinese in Taiwan