程序员的资源宝库

网站首页 > gitee 正文

学习.NET (1) 语言和国家地区 上 Language and Region (1st Half)

sanyeah 2024-04-05 13:13:01 gitee 10 ℃ 0 评论

 
Part I: Language and Region (1st Half)
By Alva Chien
1.           The name of culture contains two parts, and the names follow the RFC 1766 standard in the format "<languagecode2>-<country/regioncode2>", where <languagecode2> is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. In cases where a two-letter language code is not available, the three-letter code derived from ISO 639-2 is used; Some culture names have suffixes that specify the script; for example, "-Cyrl" specifies the Cyrillic script, "-Latn" specifies the Latin script.
2.           Table of culture which supported by the FCL.
Culture Name
Culture Identifier
Language-Country/Region
"" (empty string)
0x007F
invariant culture
af
0x0036
Afrikaans
af-ZA
0x0436
Afrikaans - South Africa
sq
0x001C
Albanian
sq-AL
0x041C
Albanian - Albania
ar
0x0001
Arabic
ar-DZ
0x1401
Arabic - Algeria
ar-BH
0x3C01
Arabic - Bahrain
ar-EG
0x0C01
Arabic - Egypt
ar-IQ
0x0801
Arabic - Iraq
ar-JO
0x2C01
Arabic - Jordan
ar-KW
0x3401
Arabic - Kuwait
ar-LB
0x3001
Arabic - Lebanon
ar-LY
0x1001
Arabic - Libya
ar-MA
0x1801
Arabic - Morocco
ar-OM
0x2001
Arabic - Oman
ar-QA
0x4001
Arabic - Qatar
ar-SA
0x0401
Arabic - Saudi Arabia
ar-SY
0x2801
Arabic - Syria
ar-TN
0x1C01
Arabic - Tunisia
ar-AE
0x3801
Arabic - United Arab Emirates
ar-YE
0x2401
Arabic - Yemen
hy
0x002B
Armenian
hy-AM
0x042B
Armenian - Armenia
az
0x002C
Azeri
az-AZ-Cyrl
0x082C
Azeri (Cyrillic) - Azerbaijan
az-AZ-Latn
0x042C
Azeri (Latin) - Azerbaijan
eu
0x002D
Basque
eu-ES
0x042D
Basque - Basque
be
0x0023
Belarusian
be-BY
0x0423
Belarusian - Belarus
bg
0x0002
Bulgarian
bg-BG
0x0402
Bulgarian - Bulgaria
ca
0x0003
Catalan
ca-ES
0x0403
Catalan - Catalan
zh-HK
0x0C04
Chinese - Hong Kong SAR
zh-MO
0x1404
Chinese - Macao SAR
zh-CN
0x0804
Chinese - China
zh-CHS
0x0004
Chinese (Simplified)
zh-SG
0x1004
Chinese - Singapore
zh-TW
0x0404
Chinese - Taiwan
zh-CHT
0x7C04
Chinese (Traditional)
hr
0x001A
Croatian
hr-HR
0x041A
Croatian - Croatia
cs
0x0005
Czech
cs-CZ
0x0405
Czech - Czech Republic
da
0x0006
Danish
da-DK
0x0406
Danish - Denmark
div
0x0065
Dhivehi
div-MV
0x0465
Dhivehi - Maldives
nl
0x0013
Dutch
nl-BE
0x0813
Dutch - Belgium
nl-NL
0x0413
Dutch - The Netherlands
en
0x0009
English
en-AU
0x0C09
English - Australia
en-BZ
0x2809
English - Belize
en-CA
0x1009
English - Canada
en-CB
0x2409
English - Caribbean
en-IE
0x1809
English - Ireland
en-JM
0x2009
English - Jamaica
en-NZ
0x1409
English - New Zealand
en-PH
0x3409
English - Philippines
en-ZA
0x1C09
English - South Africa
en-TT
0x2C09
English - Trinidad and Tobago
en-GB
0x0809
English - United Kingdom
en-US
0x0409
English - United States
en-ZW
0x3009
English - Zimbabwe
et
0x0025
Estonian
et-EE
0x0425
Estonian - Estonia
fo
0x0038
Faroese
fo-FO
0x0438
Faroese - Faroe Islands
fa
0x0029
Farsi
fa-IR
0x0429
Farsi - Iran
fi
0x000B
Finnish
fi-FI
0x040B
Finnish - Finland
fr
0x000C
French
fr-BE
0x080C
French - Belgium
fr-CA
0x0C0C
French - Canada
fr-FR
0x040C
French - France
fr-LU
0x140C
French - Luxembourg
fr-MC
0x180C
French - Monaco
fr-CH
0x100C
French - Switzerland
gl
0x0056
Galician
gl-ES
0x0456
Galician - Galician
ka
0x0037
Georgian
ka-GE
0x0437
Georgian - Georgia
de
0x0007
German
de-AT
0x0C07
German - Austria
de-DE
0x0407
German - Germany
de-LI
0x1407
German - Liechtenstein
de-LU
0x1007
German - Luxembourg
de-CH
0x0807
German - Switzerland
el
0x0008
Greek
el-GR
0x0408
Greek - Greece
gu
0x0047
Gujarati
gu-IN
0x0447
Gujarati - India
he
0x000D
Hebrew
he-IL
0x040D
Hebrew - Israel
hi
0x0039
Hindi
hi-IN
0x0439
Hindi - India
hu
0x000E
Hungarian
hu-HU
0x040E
Hungarian - Hungary
is
0x000F
Icelandic
is-IS
0x040F
Icelandic - Iceland
id
0x0021
Indonesian
id-ID
0x0421
Indonesian - Indonesia
it
0x0010
Italian
it-IT
0x0410
Italian - Italy
it-CH
0x0810
Italian - Switzerland
ja
0x0011
Japanese
ja-JP
0x0411
Japanese - Japan
kn
0x004B
Kannada
kn-IN
0x044B
Kannada - India
kk
0x003F
Kazakh
kk-KZ
0x043F
Kazakh - Kazakhstan
kok
0x0057
Konkani
kok-IN
0x0457
Konkani - India
ko
0x0012
Korean
ko-KR
0x0412
Korean - Korea
ky
0x0040
Kyrgyz
ky-KG
0x0440
Kyrgyz - Kyrgyzstan
lv
0x0026
Latvian
lv-LV
0x0426
Latvian - Latvia
lt
0x0027
Lithuanian
lt-LT
0x0427
Lithuanian - Lithuania
mk
0x002F
Macedonian
mk-MK
0x042F
Macedonian - Former Yugoslav Republic of Macedonia
ms
0x003E
Malay
ms-BN
0x083E
Malay - Brunei
ms-MY
0x043E
Malay - Malaysia
mr
0x004E
Marathi
mr-IN
0x044E
Marathi - India
mn
0x0050
Mongolian
mn-MN
0x0450
Mongolian - Mongolia
no
0x0014
Norwegian
nb-NO
0x0414
Norwegian (Bokm?l) - Norway
nn-NO
0x0814
Norwegian (Nynorsk) - Norway
pl
0x0015
Polish
pl-PL
0x0415
Polish - Poland
pt
0x0016
Portuguese
pt-BR
0x0416
Portuguese - Brazil
pt-PT
0x0816
Portuguese - Portugal
pa
0x0046
Punjabi
pa-IN
0x0446
Punjabi - India
ro
0x0018
Romanian
ro-RO
0x0418
Romanian - Romania
ru
0x0019
Russian
ru-RU
0x0419
Russian - Russia
sa
0x004F
Sanskrit
sa-IN
0x044F
Sanskrit - India
sr-SP-Cyrl
0x0C1A
Serbian (Cyrillic) - Serbia
sr-SP-Latn
0x081A
Serbian (Latin) - Serbia
sk
0x001B
Slovak
sk-SK
0x041B
Slovak - Slovakia
sl
0x0024
Slovenian
sl-SI
0x0424
Slovenian - Slovenia
es
0x000A
Spanish
es-AR
0x2C0A
Spanish - Argentina
es-BO
0x400A
Spanish - Bolivia
es-CL
0x340A
Spanish - Chile
es-CO
0x240A
Spanish - Colombia
es-CR
0x140A
Spanish - Costa Rica
es-DO
0x1C0A
Spanish - Dominican Republic
es-EC
0x300A
Spanish - Ecuador
es-SV
0x440A
Spanish - El Salvador
es-GT
0x100A
Spanish - Guatemala
es-HN
0x480A
Spanish - Honduras
es-MX
0x080A
Spanish - Mexico
es-NI
0x4C0A
Spanish - Nicaragua
es-PA
0x180A
Spanish - Panama
es-PY
0x3C0A
Spanish - Paraguay
es-PE
0x280A
Spanish - Peru
es-PR
0x500A
Spanish - Puerto Rico
es-ES
0x0C0A
Spanish - Spain
es-UY
0x380A
Spanish - Uruguay
es-VE
0x200A
Spanish - Venezuela
sw
0x0041
Swahili
sw-KE
0x0441
Swahili - Kenya
sv
0x001D
Swedish
sv-FI
0x081D
Swedish - Finland
sv-SE
0x041D
Swedish - Sweden
syr
0x005A
Syriac
syr-SY
0x045A
Syriac - Syria
ta
0x0049
Tamil
ta-IN
0x0449
Tamil - India
tt
0x0044
Tatar
tt-RU
0x0444
Tatar - Russia
te
0x004A
Telugu
te-IN
0x044A
Telugu - India
th
0x001E
Thai
th-TH
0x041E
Thai - Thailand
tr
0x001F
Turkish
tr-TR
0x041F
Turkish - Turkey
uk
0x0022
Ukrainian
uk-UA
0x0422
Ukrainian - Ukraine
ur
0x0020
Urdu
ur-PK
0x0420
Urdu - Pakistan
uz
0x0043
Uzbek
uz-UZ-Cyrl
0x0843
Uzbek (Cyrillic) - Uzbekistan
uz-UZ-Latn
0x0443
Uzbek (Latin) - Uzbekistan
vi
0x002A
Vietnamese
vi-VN
0x042A
Vietnamese - Vietnam
3.           Determines the parent culture of each specific culture using the Chinese language, codes as below, the left node must be specific cultures, as it is defined:
// Prints the header.
Console.WriteLine( "SPECIFIC CULTURE PARENT CULTURE" );
// Determines the specific cultures that use the Chinese language, and displays the parent culture.
foreach ( CultureInfo ci in CultureInfo.GetCultures( CultureTypes.SpecificCultures ) )
{
   if ( ci.TwoLetterISOLanguageName == "zh" )
   {
      Console.Write( "0x{0} {1} {2,-37}", ci.LCID.ToString("X4"), ci.Name,      ci.EnglishName );
      Console.WriteLine( "0x{0} {1} {2}", ci.Parent.LCID.ToString("X4"), ci.Parent.Name, ci.Parent.EnglishName );
    }
}
/* This code produces the following output.
SPECIFIC CULTURE PARENT CULTURE
0x0404 zh-TW Chinese (Taiwan)
0x7C04 zh-CHT Chinese (Traditional)
0x0804 zh-CN Chinese (People's Republic of China)
0x0004 zh-CHS Chinese (Simplified)
0x0C04 zh-HK Chinese (Hong Kong S.A.R.)
0x7C04 zh-CHT Chinese (Traditional)
0x1004 zh-SG Chinese (Singapore)
0x0004 zh-CHS Chinese (Simplified)
0x1404 zh-MO Chinese (Macau S.A.R.)
0x0004 zh-CHS Chinese (Simplified) */
4.           The cultures are generally grouped into three sets: the invariant culture, the neutral cultures, and the specific cultures.
5.           The invariant culture is culture-insensitive. You can specify the invariant culture by name using an empty string ("") or by its culture identifier 0x007F. It usually to use in culture-independent case.
6.           A neutral culture is a culture that is associated with a language but not with a country/region. A specific culture is a culture that is associated with a language and a country/region. Note that "zh-CHS" (Simplified Chinese) and "zh-CHT" (Traditional Chinese) are neutral cultures.
7.          A Specific culture is a culture includes the language and country/region both.
8.           The cultures have a hierarchy, such that the parent of a specific culture is a neutral culture and the parent of a neutral culture is the InvariantCulture. The Parent property returns the neutral culture associated with a specific culture.
9.           A DateTimeFormatInfo or a NumberFormatInfo can be created only for the invariant culture or for specific cultures, not for neutral cultures.
10.       The user might choose to override some of the values associated with the current culture of Windows through Regional and Language Options (or Regional Options or Regional Settings) in Control Panel. If UseUserOverride is true and the specified culture matches the current culture of Windows, the CultureInfo uses those overrides, including user settings for the properties of the DateTimeFormatInfo instance returned by the DateTimeFormat property, the properties of the NumberFormatInfo instance returned by the NumberFormat property, and the properties of the CompareInfo instance returned by the CompareInfo property. If the user settings are incompatible with the culture associated with the CultureInfo (for example, if the selected calendar is not one of the OptionalCalendars), the results of the methods and the values of the properties are undefined.
11.       Example to display all neutral cultures, it's normal to display all the languages, as a fact, many regions used a same language, GB and US all using English, for instance.
// Displays several properties of the neutral cultures.
Console.WriteLine( "CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME" );
foreach ( CultureInfo ci in CultureInfo.GetCultures( CultureTypes.NeutralCultures ) )
{
Console.Write( "{0,-7}", ci.Name );
Console.Write( " {0,-3}", ci.TwoLetterISOLanguageName );
Console.Write( " {0,-3}", ci.ThreeLetterISOLanguageName );
Console.Write( " {0,-3}", ci.ThreeLetterWindowsLanguageName );
Console.Write( " {0,-40}", ci.DisplayName );
Console.WriteLine( " {0,-40}", ci.EnglishName );
}
/* This code produces the following output. This output has been cropped for brevity. CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME
ar ar ara ARA Arabic Arabic
bg bg bul BGR Bulgarian Bulgarian
ca ca cat CAT Catalan Catalan
zh-CHS zh zho CHS Chinese (Simplified) Chinese (Simplified)
zh-CHT zh zho CHT Chinese (Traditional) Chinese (Traditional)
cs cs ces CSY Czech Czech
da da dan DAN Danish Danish
de de deu DEU German German
el el ell ELL Greek Greek
en en eng ENU English English
es es spa ESP Spanish Spanish
fi fi fin FIN Finnish Finnish
the others…. */
12.       Get the full region info list by using RegionInfo class. But unfortunately, the FCL didn’t support methods to load all default regions. Another important thing need to point out is that Currency info can get from region info. You can use Name, DisplayName, EnglishName, NativeName, TwoLetterISORegionName, ThreeLetterISORegionName property to load the unique name. You can also use GeoID to get unique ID of each region. CurrencySymbol and ISOCurrencySymbo get the currency symbol information; CurrencyDisplayName and CurrencyNativeName get the name of currency.
13.       Tables of region:
ISO 3166 2-letter code
ISO 3166 3-letter code
Country/Region
AE
ARE
United Arab Emirates
AL
ALB
Albania
AM
ARM
Armenia
AR
ARG
Argentina
AT
AUT
Austria
AU
AUS
Australia
AZ
AZE
Azerbaijan
BE
BEL
Belgium
BG
BGR
Bulgaria
BH
BHR
Bahrain
BN
BRN
Brunei
BO
BOL
Bolivia
BR
BRA
Brazil
BY
BLR
Belarus
BZ
BLZ
Belize
CA
CAN
Canada
CB
CAR
Caribbean
CH
CHE
Switzerland
CL
CHL
Chile
CN
CHN
China
CO
COL
Colombia
CR
CRI
Costa Rica
CZ
CZE
Czech Republic
DE
DEU
Germany
DK
DNK
Denmark
DO
DOM
Dominican Republic
DZ
DZA
Algeria
EC
ECU
Ecuador
EE
EST
Estonia
EG
EGY
Egypt
ES
ESP
Spain
FI
FIN
Finland
FO
FRO
Faroe Islands
FR
FRA
France
GB
GBR
United Kingdom
GE
GEO
Georgia
GR
GRC
Greece
GT
GTM
Guatemala
HK
HKG
Hong Kong SAR
HN
HND
Honduras
HR
HRV
Croatia
HU
HUN
Hungary
ID
IDN
Indonesia
IE
IRL
Ireland
IL
ISR
Israel
IN
IND
India
IQ
IRQ
Iraq
IR
IRN
Iran
IS
ISL
Iceland
IT
ITA
Italy
JM
JAM
Jamaica
JO
JOR
Jordan
JP
JPN
Japan
KE
KEN
Kenya
KG
KGZ
Kyrgyzstan
KR
KOR
Korea
KW
KWT
Kuwait
KZ
KAZ
Kazakhstan
LB
LBN
Lebanon
LI
LIE
Liechtenstein
LT
LTU
Lithuania
LU
LUX
Luxembourg
LV
LVA
Latvia
LY
LBY
Libya
MA
MAR
Morocco
MC
MCO
Monaco
MK
MKD
FYROM
MN
MNG
Mongolia
MO
MAC
Macao SAR
MV
MDV
Maldives
MX
MEX
Mexico
MY
MYS
Malaysia
NI
NIC
Nicaragua
NL
NLD
The Netherlands
NO
NOR
Norway
NZ
NZL
New Zealand
OM
OMN
Oman
PA
PAN
Panama
PE
PER
Peru
PH
PHL
Philippines
PK
PAK
Pakistan
PL
POL
Poland
PR
PRI
Puerto Rico
PT
PRT
Portugal
PY
PRY
Paraguay
QA
QAT
Qatar
RO
ROM
Romania
RU
RUS
Russia
SA
SAU
Saudi Arabia
SE
SWE
Sweden
SG
SGP
Singapore
SI
SVN
Slovenia
SK
SVK
Slovakia
SP
SPB
Serbia
SV
SLV
El Salvador
SY
SYR
Syria
TA
TAT
Russia
TH
THA
Thailand
TN
TUN
Tunisia
TR
TUR
Turkey
TT
TTO
Trinidad and Tobago
TW
TWN
Taiwan
UA
UKR
Ukraine
US
USA
United States
UY
URY
Uruguay
UZ
UZB
Uzbekistan
VE
VEN
Venezuela
VN
VNM
Vietnam
YE
YEM
Yemen
ZA
ZAF
South Africa
ZW
ZWE
Zimbabwe
14.       Table of Currency:
Country/Region
Currency name
ISO 4217 currency symbol
United Arab Emirates
UAE Dirham
AED
Albania
Lek
ALL
Armenia
Armenian Dram
AMD
Argentina
Argentine Peso
ARS
Austria
Euro
EUR
Australia
Australian Dollar
AUD
Azerbaijan
Azerbaijanian Manat
AZM
Belgium
Euro
EUR
Bulgaria
Lev
BGL
Bahrain
Bahraini Dinar
BHD
Brunei
Brunei Dollar
BND
Bolivia
Boliviano
BOB
Brazil
Brazilian Real
BRL
Belarus
Belarussian Ruble
BYB
Belize
Belize Dollar
BZD
Canada
Canadian Dollar
CAD
Caribbean
US Dollar
USD
Switzerland
Swiss Franc
CHF
Chile
Chilean Peso
CLP
China
Yuan Renminbi
CNY
Colombia
Colombian Peso
COP
Costa Rica
Costa Rican Colon
CRC
Czech Republic
Czech Koruna
CZK
Germany
Euro
EUR
Denmark
Danish Krone
DKK
Dominican Republic
Dominican Peso
DOP
Algeria
Algerian Dinar
DZD
Ecuador
US Dollar
USD
Estonia
Kroon
EEK
Egypt
Egyptian Pound
EGP
Spain
Euro
EUR
Finland
Euro
EUR
Faroe Islands
Danish Krone
DKK
France
Euro
EUR
United Kingdom
Pound Sterling
GBP
Georgia
Lari
GEL
Greece
Euro
EUR
Guatemala
Quetzal
GTQ
Hong Kong SAR
Hong Kong Dollar
HKD
Honduras
Lempira
HNL
Croatia
Croatian kuna
HRK
FYROM
Denar
MKD
Hungary
Forint
HUF
Indonesia
Rupiah
IDR
Ireland
Euro
EUR
Israel
New Israeli Sheqel
ILS
India
Indian Rupee
INR
Iraq
Iraqi Dinar
IQD
Iran
Iranian Rial
IRR
Iceland
Iceland Krona
ISK
Italy
Euro
EUR
Jamaica
Jamaican Dollar
JMD
Jordan
Jordanian Dinar
JOD
Japan
Yen
JPY
Kenya
Kenyan Shilling
KES
Kyrgyzstan
Som
KGS
Korea
Won
KRW
Kuwait
Kuwaiti Dinar
KWD
Kazakhstan
Tenge
KZT
Lebanon
Lebanese Pound
LBP
Liechtenstein
Swiss Franc
CHF
Lithuania
Lithuanian Litus
LTL
Luxembourg
Euro
EUR
Latvia
Latvian Lats
LVL
Libya
Libyan Dinar
LYD
Morocco
Moroccan Dirham
MAD
Monaco
Euro
EUR
Mongolia
Tugrik
MNT
Macao SAR
Pataca
MOP
Maldives
Rufiyaa
MVR
Mexico
Mexican Peso
MXN
Malaysia
Malaysian Ringgit
MYR
Nicaragua
Cordoba Oro
NIO
The Netherlands
Euro
EUR
Norway
Norwegian Krone
NOK
New Zealand
New Zealand Dollar
NZD
Oman
Rial Omani
OMR
Panama
Balboa
PAB
Peru
Nuevo Sol
PEN
Philippines
Philippine Peso
PHP
Pakistan
Pakistan Rupee
PKR
Poland
Zloty
PLN
Puerto Rico
US Dollar
USD
Portugal
Euro
EUR
Paraguay
Guarani
PYG
Qatar
Qatari Rial
QAR
Romania
Leu
ROL
Russia
Russian Ruble
RUR
Saudi Arabia
Saudi Riyal
SAR
Sweden
Swedish Krona
SEK
Singapore
Singapore Dollar
SGD
Slovenia
Tolar
SIT
Slovakia
Slovak Koruna
SKK
Serbia
Yugoslavian New Dinar
YUN
El Salvador
US Dollar
USD
Syria
Syrian Pound
SYP
Thailand
Baht
THB
Tunisia
Tunisian Dinar
TND
Turkey
New Turkish Lira
YTL
Trinidad and Tobago
Trinidad and Tobago Dollar
TTD
Taiwan
New Taiwan Dollar
TWD
Ukraine
Hryvnia
UAH
United States
US Dollar
USD
Uruguay
Peso Uruguayo
UYU
Uzbekistan
Uzbekistan Sum
UZS
Venezuela
Bolivar
VEB
Vietnam
Dong
VND
Yemen
Yemeni Rial
YER
South Africa
Rand
ZAR
Zimbabwe
Zimbabwe Dollar
ZWD
15.        The end
 

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表