컴퓨터활용/유닉스

Locale value syntax

멜번초이 2014. 6. 13. 14:03

 

Locale value syntax

In general, a value for a locale category (the according environment variable) is constructed like this:

"xy[_XY][.codeset][@modifier]"
xy: language-abbreviation, ISO 639-1 (2 characters), [ISO 639-2 (3 characters) might be used for languages without a two letter code] XY: country/territory, ISO 3166 [3166-2 three letter codes might be possible] codeset: f.i. "iso88591", "ISO8859-1", "UTF-8", "greek8", "roman", etc modifer: anything else refining it. for example "euro" for the currency symbol, or "phone" for a different sorting order (LC_COLLATE).

Unfortunately there is no standardization.
The exact values sometimes noticably differ among the various Unix flavours.

Some examples for such values:

  • "C" - the standard value, usually the default, the same like not setting the category at all. 7-bit ASCII charset, no goodies. Ironically enough, at least one vendor (HP) apparently felt the need to provide "C.iso88591". The name C is associated with ANSI C.

     

  • "en_US, en_US.iso88591" - ascii and the western europe specific characters.
    en_US (if available) always contains iso8859-1, even without the codeset suffix.

    However HP-UX 10/11 provide only values with the codeset, for example en_US.iso88591.
    You see it's essential to find out about the valid values instead of only guessing.

     

  • although "de_DE" is valid syntax, this value doesn't exist on many Solaris versions (but only "de").

     

  • "fr_CA.roman8" - might be appropriate for canadians

     

  • "zh_TW.big5" traditional chinese in taiwan with the BIG5 codeset (not an eight bit locale, but a good example).

     

  • "en_US.ISO8859-15@euro" - example from Solaris supporting the "euro sign" instead of the dollar sign as currency character (apart from that @euro is the default for iso8859-15).

 

 

 

 

http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_639.html

 

ISO 639 Codes (Names of Languages)

Technical contents of ISO 639:1988 (E/F) "Code for the representation of names of languages". Two-letter lower-case symbols are used.

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 Faeroese
fr French
fy Frisian

ga Irish
gd Scots Gaelic
gl Galician
gn Guarani
gu Gujarati

ha Hausa
hi Hindi
hr Croatian
hu Hungarian
hy Armenian

ia Interlingua
ie Interlingue
ik Inupiak
in Indonesian
is Icelandic
it Italian
iw Hebrew

ja Japanese
ji Yiddish
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 Sangro
sh Serbo-Croatian
si Singhalese
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 Tegulu
tg Tajik
th Thai
ti Tigrinya
tk Turkmen
tl Tagalog
tn Setswana
to Tonga
tr Turkish
ts Tsonga
tt Tatar
tw Twi

uk Ukrainian
ur Urdu
uz Uzbek

vi Vietnamese
vo Volapuk

wo Wolof

xh Xhosa

yo Yoruba

zh Chinese
zu Zulu

 

 

 

 

 

 

ISO 3166 Codes (Countries)

(by the RIPE Network Coordination Centre, in coordination with the ISO 3166 Maintenance Agency, Berlin)

See also:

  • ISO 3166 Maintenance agency (ISO 3166/MA)
  • Country codes in ISO 3166
  • Codes from ISO 3166-1

      Country                                         A 2     A 3     Number
      ----------------------------------------------------------------------
      AALAND ISLANDS                                  AX      ALA     248
      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, Democratic Republic of (was Zaire)       CD      COD     180
      CONGO, Republic of                              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
      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
      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
      PALESTINIAN TERRITORY, Occupied                 PS      PSE     275
      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      ROU     642
      RUSSIAN FEDERATION                              RU      RUS     643
      RWANDA                                          RW      RWA     646
      SAINT HELENA                                    SH      SHN     654
      SAINT KITTS AND NEVIS                           KN      KNA     659
      SAINT LUCIA                                     LC      LCA     662
      SAINT PIERRE AND MIQUELON                       PM      SPM     666
      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
      SERBIA AND MONTENEGRO                           CS      SCG     891
      SEYCHELLES                                      SC      SYC     690
      SIERRA LEONE                                    SL      SLE     694
      SINGAPORE                                       SG      SGP     702
      SLOVAKIA                                        SK      SVK     703  
      SLOVENIA                                        SI      SVN     705  
      SOLOMON ISLANDS                                 SB      SLB     090
      SOMALIA                                         SO      SOM     706
      SOUTH AFRICA                                    ZA      ZAF     710
      SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS    GS      SGS     239
      SPAIN                                           ES      ESP     724
      SRI LANKA                                       LK      LKA     144
      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
      TIMOR-LESTE                                     TL      TLS     626
      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
      VIET NAM                                        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
      ZAMBIA                                          ZM      ZMB     894
      ZIMBABWE                                        ZW      ZWE     716
      

     

    '컴퓨터활용 > 유닉스' 카테고리의 다른 글

    ftp server install in Ubuntu Linux  (0) 2014.10.14
    telnetd install in Ubuntu Linux  (0) 2014.10.14
    유닉스 쉘에서 전일 날짜를 구하는 법  (0) 2014.05.23
    AUTH_MAXTRIES clear  (0) 2013.12.16
    HP 기본 .profile  (0) 2013.12.10