.NET RegionInfo class

我的未来我决定 提交于 2019-12-04 12:01:40

问题


When I try to create a new RegionInfo with certain ISO 3166 country codes ("BD" for Bangladesh, "SO" for Somalia, "LK" for Sri Lanka), I get an ArgumentException that says it's not recognized.

What's the deal? The Intellisense of RegionInfo(string) says it conforms to ISO 3166, but these country/region codes are not supported?

I don't get it.


回答1:


.NET doesn't provide all Cultures/Regions out-of-the-box. Note the 'predefined' RegionInfos here: http://msdn.microsoft.com/en-us/library/system.globalization.regioninfo(VS.80).aspx.

Unfortunately, if you want to use non-predefined Regions, you have to define them yourself. Here's the MSDN how-to: http://msdn.microsoft.com/en-us/library/ms172469(VS.80).aspx.




回答2:


SomeAll of the regions you missed are now supported (in newer versions of the .NET Framework and of the operating system).

The following code finds all RegionInfo that are "reachable" from a specific culture:

foreach (var ri in CultureInfo.GetCultures(CultureTypes.SpecificCultures).Select(ci => new RegionInfo(ci.ToString())).OrderBy(x => x.TwoLetterISORegionName))
    Console.WriteLine("{0,3}: {1,11}: {2} ({3})", ri.TwoLetterISORegionName, ri, ri.EnglishName, ri.NativeName);

On my machine right now it gives:

001:      ar-001: World (العالم)
001:      en-001: World (World)
001:      eo-001: World (World)
001:      ia-001: World (World)
001:      la-001: World (World)
001:     prg-001: World (swītai)
001:      vo-001: World (World)
001:      yi-001: World (וועלט)
029:      en-029: Caribbean (Caribbean)
029:      fr-029: Caribbean (caraïbes)
029:     pap-029: Caribbean (Caribbean)
150:      en-150: Europe (Europe)
419:      es-419: Latin America (Latinoamérica)
 AD:       ca-AD: Andorra (Andorra)
 AE:       ar-AE: United Arab Emirates (الإمارات العربية المتحدة)
 AF:      prs-AF: Afghanistan (افغانستان)
 AF:       ps-AF: Afghanistan (افغانستان)
 AF:  uz-Arab-AF: Afghanistan (افغانستان)
 AG:       en-AG: Antigua and Barbuda (Antigua and Barbuda)
 AI:       en-AI: Anguilla (Anguilla)
 AL:       sq-AL: Albania (Shqipëri)
 AM:       hy-AM: Armenia (Հայաստան)
 AO:       ln-AO: Angola (Angóla)
 AO:       pt-AO: Angola (Angola)
 AR:       es-AR: Argentina (Argentina)
 AS:       en-AS: American Samoa (American Samoa)
 AT:       de-AT: Austria (Österreich)
 AT:       en-AT: Austria (Austria)
 AU:       en-AU: Australia (Australia)
 AW:       nl-AW: Aruba (Aruba)
 AX:       sv-AX: Åland Islands (Åland)
 AZ:  az-Cyrl-AZ: Azerbaijan (Азәрбајҹан)
 AZ:  az-Latn-AZ: Azerbaijan (Azərbaycan)
 BA:  bs-Cyrl-BA: Bosnia and Herzegovina (Босна и Херцеговина)
 BA:  bs-Latn-BA: Bosnia and Herzegovina (Bosna i Hercegovina)
 BA:       hr-BA: Bosnia and Herzegovina (Bosna i Hercegovina)
 BA:  sr-Cyrl-BA: Bosnia and Herzegovina (Босна и Херцеговина)
 BA:  sr-Latn-BA: Bosnia and Herzegovina (Bosna i Hercegovina)
 BB:       en-BB: Barbados (Barbados)
 BD:       bn-BD: Bangladesh (বাংলাদেশ)
 BE:       de-BE: Belgium (Belgien)
 BE:       en-BE: Belgium (Belgium)
 BE:       fr-BE: Belgium (Belgique)
 BE:       nl-BE: Belgium (België)
 BF:       fr-BF: Burkina Faso (Burkina Faso)
 BG:       bg-BG: Bulgaria (България)
 BH:       ar-BH: Bahrain (البحرين)
 BI:       en-BI: Burundi (Burundi)
 BI:       fr-BI: Burundi (Burundi)
 BI:       rn-BI: Burundi (Uburundi)
 BJ:       fr-BJ: Benin (Bénin)
 BJ:       yo-BJ: Benin (Orílɛ́ède Bɛ̀nɛ̀)
 BL:       fr-BL: Saint Barthélemy (Saint-Barthélemy)
 BM:       en-BM: Bermuda (Bermuda)
 BN:       ms-BN: Brunei (Brunei)
 BO:       es-BO: Bolivia (Bolivia)
 BO:      quz-BO: Bolivia (Bolivia)
 BQ:       nl-BQ: Bonaire, Sint Eustatius and Saba (Bonaire, Sint Eustatius en Saba)
 BR:       es-BR: Brazil (Brasil)
 BR:       pt-BR: Brazil (Brasil)
 BS:       en-BS: Bahamas (Bahamas)
 BT:       dz-BT: Bhutan (འབྲུག)
 BW:       en-BW: Botswana (Botswana)
 BW:       tn-BW: Botswana (Botswana)
 BY:       be-BY: Belarus (Беларусь)
 BY:       ru-BY: Belarus (Беларусь)
 BZ:       en-BZ: Belize (Belize)
 BZ:       es-BZ: Belize (Belice)
 CA:       en-CA: Canada (Canada)
 CA:       fr-CA: Canada (Canada)
 CA:  iu-Cans-CA: Canada (ᑲᓇᑕ)
 CA:  iu-Latn-CA: Canada (Kanata)
 CA:      moh-CA: Canada (Canada)
 CC:       en-CC: Cocos (Keeling) Islands (Cocos (Keeling) Islands)
 CD:       fr-CD: Congo (DRC) (Congo, République démocratique du)
 CD:       ln-CD: Congo (DRC) (Republíki ya Kongó Demokratíki)
 CD:       lu-CD: Congo (DRC) (Ditunga wa Kongu)
 CD:       sw-CD: Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)
 CF:       fr-CF: Central African Republic (République centrafricaine)
 CF:       ln-CF: Central African Republic (Repibiki ya Afríka ya Káti)
 CF:       sg-CF: Central African Republic (Ködörösêse tî Bêafrîka)
 CG:       fr-CG: Congo (Congo)
 CG:       ln-CG: Congo (Kongo)
 CH:       de-CH: Switzerland (Schweiz)
 CH:       en-CH: Switzerland (Switzerland)
 CH:       fr-CH: Switzerland (Suisse)
 CH:      gsw-CH: Switzerland (Schwiiz)
 CH:       it-CH: Switzerland (Svizzera)
 CH:       pt-CH: Switzerland (Suíça)
 CH:       rm-CH: Switzerland (Svizra)
 CH:      wae-CH: Switzerland (Schwiz)
 CI:       fr-CI: Côte d’Ivoire (Côte d’Ivoire)
 CK:       en-CK: Cook Islands (Cook Islands)
 CL:      arn-CL: Chile (Chile)
 CL:       es-CL: Chile (Chile)
 CM:      agq-CM: Cameroon (Kàmàlûŋ)
 CM:      bas-CM: Cameroon (Kàmɛ̀rûn)
 CM:      dua-CM: Cameroon (Cameroun)
 CM:       en-CM: Cameroon (Cameroon)
 CM:      ewo-CM: Cameroon (Kamərún)
 CM:       ff-CM: Cameroon (Kameruun)
 CM:       fr-CM: Cameroon (Cameroun)
 CM:      jgo-CM: Cameroon (Kamɛlûn)
 CM:      kkj-CM: Cameroon (Kamɛrun)
 CM:      ksf-CM: Cameroon (kamɛrún)
 CM:      mgo-CM: Cameroon (Kamalun)
 CM:      mua-CM: Cameroon (kameruŋ)
 CM:      nmg-CM: Cameroon (Kamerun)
 CM:      nnh-CM: Cameroon (Kàmalûm)
 CM:      yav-CM: Cameroon (Kemelún)
 CN:       bo-CN: China (ཀྲུང་ཧྭ་མི་དམངས་སྤྱི་མཐུན་རྒྱལ་ཁབ།)
 CN:       ii-CN: China (ꍏꉸꏓꂱꇭꉼꇩ)
 CN:  mn-Mong-CN: China (ᠪᠦᠭᠦᠳᠡ ᠨᠠᠢᠷᠠᠮᠳᠠᠬᠤ ᠳᠤᠮᠳᠠᠳᠤ ᠠᠷᠠᠳ ᠣᠯᠣᠰ)
 CN:       ug-CN: China (جۇڭخۇا خەلق جۇمھۇرىيىتى)
 CN:       zh-CN: China (中国)
 CO:       es-CO: Colombia (Colombia)
 CR:       es-CR: Costa Rica (Costa Rica)
 CU:       es-CU: Cuba (Cuba)
 CV:      kea-CV: Cabo Verde (Kabu Verdi)
 CV:       pt-CV: Cabo Verde (Cabo Verde)
 CW:       nl-CW: Curaçao (Curaçao)
 CX:       en-CX: Christmas Island (Christmas Island)
 CY:       el-CY: Cyprus (Κύπρος)
 CY:       en-CY: Cyprus (Cyprus)
 CY:       tr-CY: Cyprus (Kıbrıs)
 CZ:       cs-CZ: Czechia (Česko)
 DE:       de-DE: Germany (Deutschland)
 DE:      dsb-DE: Germany (Nimska)
 DE:       en-DE: Germany (Germany)
 DE:      hsb-DE: Germany (Němska)
 DE:      ksh-DE: Germany (Doütschland)
 DE:      nds-DE: Germany (Düütschland)
 DJ:       aa-DJ: Djibouti (Yabuuti)
 DJ:       ar-DJ: Djibouti (جيبوتي)
 DJ:       fr-DJ: Djibouti (Djibouti)
 DJ:       so-DJ: Djibouti (Jabuuti)
 DK:       da-DK: Denmark (Danmark)
 DK:       en-DK: Denmark (Denmark)
 DK:       fo-DK: Denmark (Danmark)
 DM:       en-DM: Dominica (Dominica)
 DO:       es-DO: Dominican Republic (República Dominicana)
 DZ:       ar-DZ: Algeria (الجزائر)
 DZ:       fr-DZ: Algeria (Algérie)
 DZ:      kab-DZ: Algeria (Lezzayer)
 DZ: tzm-Latn-DZ: Algeria (Djazaïr)
 EC:       es-EC: Ecuador (Ecuador)
 EC:      quz-EC: Ecuador (Ecuador)
 EE:       et-EE: Estonia (Eesti)
 EG:       ar-EG: Egypt (مصر)
 ER:       aa-ER: Eritrea (Eretria)
 ER:       ar-ER: Eritrea (إريتريا)
 ER:      byn-ER: Eritrea (ኤርትራ)
 ER:       en-ER: Eritrea (Eritrea)
 ER:      ssy-ER: Eritrea (Eretria)
 ER:       ti-ER: Eritrea (ኤርትራ)
 ER:      tig-ER: Eritrea (ኤርትራ)
 ES:      ast-ES: Spain (España)
 ES:       ca-ES: Spain (Espanya)
 ES: ca-ES-valencia: Spain (Espanya)
 ES:       es-ES: Spain (España)
 ES:       eu-ES: Spain (Espainia)
 ES:       gl-ES: Spain (España)
 ET:       aa-ET: Ethiopia (Otobbia)
 ET:       am-ET: Ethiopia (ኢትዮጵያ)
 ET:       om-ET: Ethiopia (Itoophiyaa)
 ET:       so-ET: Ethiopia (Itoobiya)
 ET:       ti-ET: Ethiopia (ኢትዮጵያ)
 ET:      wal-ET: Ethiopia (ኢትዮጵያ)
 FI:       en-FI: Finland (Finland)
 FI:       fi-FI: Finland (Suomi)
 FI:       se-FI: Finland (Suopma)
 FI:      smn-FI: Finland (Suomâ)
 FI:      sms-FI: Finland (Lää´ddjânnam)
 FI:       sv-FI: Finland (Finland)
 FJ:       en-FJ: Fiji (Fiji)
 FK:       en-FK: Falkland Islands (Falkland Islands)
 FM:       en-FM: Micronesia (Micronesia)
 FO:       fo-FO: Faroe Islands (Føroyar)
 FR:       br-FR: France (Frañs)
 FR:       ca-FR: France (França)
 FR:       co-FR: France (Francia)
 FR:       fr-FR: France (France)
 FR:      gsw-FR: France (Frànkrisch)
 FR:       ia-FR: France (Francia)
 FR:       oc-FR: France (França)
 GA:       fr-GA: Gabon (Gabon)
 GB:       cy-GB: United Kingdom (Y Deyrnas Unedig)
 GB:       en-GB: United Kingdom (United Kingdom)
 GB:       gd-GB: United Kingdom (An Rìoghachd Aonaichte)
 GB:       kw-GB: United Kingdom (Rywvaneth Unys)
 GD:       en-GD: Grenada (Grenada)
 GE:       ka-GE: Georgia (საქართველო)
 GE:       os-GE: Georgia (Гуырдзыстон)
 GF:       fr-GF: French Guiana (Guyane française)
 GG:       en-GG: Guernsey (Guernsey)
 GH:       ak-GH: Ghana (Gaana)
 GH:       ee-GH: Ghana (Ghana nutome)
 GH:       en-GH: Ghana (Ghana)
 GH:  ha-Latn-GH: Ghana (Gana)
 GI:       en-GI: Gibraltar (Gibraltar)
 GL:       da-GL: Greenland (Grønland)
 GL:       kl-GL: Greenland (Kalaallit Nunaat)
 GM:       en-GM: Gambia (Gambia)
 GN:       ff-GN: Guinea (Gine)
 GN:       fr-GN: Guinea (Guinée)
 GN:      nqo-GN: Guinea (ߖߌ߬ߣߍ߬ ߞߊ߲ߓߍ߲)
 GP:       fr-GP: Guadeloupe (Guadeloupe)
 GQ:       es-GQ: Equatorial Guinea (Guinea Ecuatorial)
 GQ:       fr-GQ: Equatorial Guinea (Guinée équatoriale)
 GQ:       pt-GQ: Equatorial Guinea (Guiné Equatorial)
 GR:       el-GR: Greece (Ελλάδα)
 GT:       es-GT: Guatemala (Guatemala)
 GT: quc-Latn-GT: Guatemala (Guatemala)
 GU:       en-GU: Guam (Guam)
 GW:       pt-GW: Guinea-Bissau (Guiné-Bissau)
 GY:       en-GY: Guyana (Guyana)
 HK:       en-HK: Hong Kong SAR (Hong Kong SAR)
 HK:  zh-Hans-HK: Hong Kong SAR (香港特别行政区)
 HK:       zh-HK: Hong Kong SAR (香港特別行政區)
 HN:       es-HN: Honduras (Honduras)
 HR:       hr-HR: Croatia (Hrvatska)
 HT:       fr-HT: Haiti (Haïti)
 HU:       hu-HU: Hungary (Magyarország)
 ID:       en-ID: Indonesia (Indonesia)
 ID:       id-ID: Indonesia (Indonesia)
 ID:  jv-Java-ID: Indonesia (Indonesia)
 ID:  jv-Latn-ID: Indonesia (Indonesia)
 IE:       en-IE: Ireland (Ireland)
 IE:       ga-IE: Ireland (Éire)
 IL:       ar-IL: Israel (إسرائيل)
 IL:       en-IL: Israel (Israel)
 IL:       he-IL: Israel (ישראל)
 IM:       en-IM: Isle of Man (Isle of Man)
 IM:       gv-IM: Isle of Man (Ellan Vannin)
 IN:       as-IN: India (ভাৰত)
 IN:       bn-IN: India (ভারত)
 IN:       bo-IN: India (རྒྱ་གར་)
 IN:      brx-IN: India (भारत)
 IN:       en-IN: India (India)
 IN:       gu-IN: India (ભારત)
 IN:       hi-IN: India (भारत)
 IN:       kn-IN: India (ಭಾರತ)
 IN:      kok-IN: India (भारत)
 IN:  ks-Arab-IN: India (ہِنٛدوستان)
 IN:  ks-Deva-IN: India (India)
 IN:       ml-IN: India (ഇന്ത്യ)
 IN:      mni-IN: India (India)
 IN:       mr-IN: India (भारत)
 IN:       ne-IN: India (भारत)
 IN:       or-IN: India (ଭାରତ)
 IN:       pa-IN: India (ਭਾਰਤ)
 IN:       sa-IN: India (भारतम्)
 IN:  sd-Deva-IN: India (India)
 IN:       ta-IN: India (இந்தியா)
 IN:       te-IN: India (భారత దేశం)
 IN:       ur-IN: India (بھارت)
 IO:       en-IO: British Indian Ocean Territory (British Indian Ocean Territory)
 IQ:       ar-IQ: Iraq (العراق)
 IQ:  ku-Arab-IQ: Iraq (عێراق)
 IQ:      lrc-IQ: Iraq (Iraq)
 IR:       fa-IR: Iran (ایران)
 IR:  ku-Arab-IR: Iran (ئێران)
 IR:      lrc-IR: Iran (Iran)
 IR:      mzn-IR: Iran (ایران)
 IS:       is-IS: Iceland (Ísland)
 IT:       ca-IT: Italy (Itàlia)
 IT:       de-IT: Italy (Italien)
 IT:      fur-IT: Italy (Italie)
 IT:       it-IT: Italy (Italia)
 JE:       en-JE: Jersey (Jersey)
 JM:       en-JM: Jamaica (Jamaica)
 JO:       ar-JO: Jordan (الأردن)
 JP:       ja-JP: Japan (日本)
 KE:      dav-KE: Kenya (Kenya)
 KE:      ebu-KE: Kenya (Kenya)
 KE:       en-KE: Kenya (Kenya)
 KE:      guz-KE: Kenya (Kenya)
 KE:      kam-KE: Kenya (Kenya)
 KE:       ki-KE: Kenya (Kenya)
 KE:      kln-KE: Kenya (Emetab Kenya)
 KE:      luo-KE: Kenya (Kenya)
 KE:      luy-KE: Kenya (Kenya)
 KE:      mas-KE: Kenya (Kenya)
 KE:      mer-KE: Kenya (Kenya)
 KE:       om-KE: Kenya (Keeniyaa)
 KE:      saq-KE: Kenya (Kenya)
 KE:       so-KE: Kenya (Kiiniya)
 KE:       sw-KE: Kenya (Kenya)
 KE:      teo-KE: Kenya (Kenia)
 KG:       ky-KG: Kyrgyzstan (Кыргызстан)
 KG:       ru-KG: Kyrgyzstan (Киргизия)
 KH:       km-KH: Cambodia (កម្ពុជា)
 KI:       en-KI: Kiribati (Kiribati)
 KM:       ar-KM: Comoros (جزر القمر)
 KM:       fr-KM: Comoros (Comores)
 KN:       en-KN: Saint Kitts and Nevis (Saint Kitts and Nevis)
 KP:       ko-KP: North Korea (조선민주주의인민공화국)
 KR:       ko-KR: Korea (대한민국)
 KW:       ar-KW: Kuwait (الكويت)
 KY:       en-KY: Cayman Islands (Cayman Islands)
 KZ:       kk-KZ: Kazakhstan (Қазақстан)
 KZ:       ru-KZ: Kazakhstan (Казахстан)
 LA:       lo-LA: Laos (ລາວ)
 LB:       ar-LB: Lebanon (لبنان)
 LC:       en-LC: Saint Lucia (Saint Lucia)
 LI:       de-LI: Liechtenstein (Liechtenstein)
 LI:      gsw-LI: Liechtenstein (Liächteschtäi)
 LK:       si-LK: Sri Lanka (ශ්‍රී ලංකාව)
 LK:       ta-LK: Sri Lanka (இலங்கை)
 LR:       en-LR: Liberia (Liberia)
 LR: vai-Latn-LR: Liberia (Laibhiya)
 LR: vai-Vaii-LR: Liberia (ꕞꔤꔫꕩ)
 LS:       en-LS: Lesotho (Lesotho)
 LS:       st-LS: Lesotho (Lesotho)
 LT:       lt-LT: Lithuania (Lietuva)
 LU:       de-LU: Luxembourg (Luxemburg)
 LU:       fr-LU: Luxembourg (Luxembourg)
 LU:       lb-LU: Luxembourg (Lëtzebuerg)
 LU:       pt-LU: Luxembourg (Luxemburgo)
 LV:       lv-LV: Latvia (Latvija)
 LY:       ar-LY: Libya (ليبيا)
 MA:       ar-MA: Morocco (المملكة المغربية)
 MA:       fr-MA: Morocco (Maroc)
 MA: shi-Latn-MA: Morocco (lmɣrib)
 MA: shi-Tfng-MA: Morocco (ⵍⵎⵖⵔⵉⴱ)
 MA: tzm-Arab-MA: Morocco (Morocco)
 MA: tzm-Latn-MA: Morocco (Meṛṛuk)
 MA: tzm-Tfng-MA: Morocco (ⵍⵎⵖⵔⵉⴱ)
 MA: zgh-Tfng-MA: Morocco (ⵍⵎⵖⵔⵉⴱ)
 MC:       fr-MC: Monaco (Monaco)
 MD:       ro-MD: Moldova (Republica Moldova)
 MD:       ru-MD: Moldova (Молдова)
 ME:  sr-Cyrl-ME: Montenegro (Црна Гора)
 ME:  sr-Latn-ME: Montenegro (Crna Gora)
 MF:       fr-MF: Saint Martin (Saint-Martin)
 MG:       en-MG: Madagascar (Madagascar)
 MG:       fr-MG: Madagascar (Madagascar)
 MG:       mg-MG: Madagascar (Madagasikara)
 MH:       en-MH: Marshall Islands (Marshall Islands)
 MK:       mk-MK: Macedonia, FYRO (Република Македонија)
 MK:       sq-MK: Macedonia, FYRO (Republika e Maqedonisë)
 ML:  bm-Latn-ML: Mali (Mali)
 ML:       fr-ML: Mali (Mali)
 ML:      khq-ML: Mali (Maali)
 ML:      ses-ML: Mali (Maali)
 MM:       my-MM: Myanmar (မြန်မာ)
 MN:       mn-MN: Mongolia (Монгол)
 MN:  mn-Mong-MN: Mongolia (ᠮᠣᠩᠭᠣᠯ ᠣᠯᠣᠰ)
 MO:       en-MO: Macao SAR (Macao SAR)
 MO:       pt-MO: Macao SAR (RAE de Macau)
 MO:  zh-Hans-MO: Macao SAR (澳门特别行政区)
 MO:       zh-MO: Macao SAR (澳門特別行政區)
 MP:       en-MP: Northern Mariana Islands (Northern Mariana Islands)
 MQ:       fr-MQ: Martinique (Martinique)
 MR:       ar-MR: Mauritania (موريتانيا)
 MR:       ff-MR: Mauritania (Muritani)
 MR:       fr-MR: Mauritania (Mauritanie)
 MS:       en-MS: Montserrat (Montserrat)
 MT:       en-MT: Malta (Malta)
 MT:       mt-MT: Malta (Malta)
 MU:       en-MU: Mauritius (Mauritius)
 MU:       fr-MU: Mauritius (Maurice)
 MU:      mfe-MU: Mauritius (Moris)
 MV:       dv-MV: Maldives (ދިވެހި ރާއްޖެ)
 MW:       en-MW: Malawi (Malawi)
 MX:       es-MX: Mexico (México)
 MY:       en-MY: Malaysia (Malaysia)
 MY:       ms-MY: Malaysia (Malaysia)
 MY:       ta-MY: Malaysia (மலேசியா)
 MZ:      mgh-MZ: Mozambique (Umozambiki)
 MZ:       pt-MZ: Mozambique (Moçambique)
 MZ:      seh-MZ: Mozambique (Moçambique)
 NA:       af-NA: Namibia (Namibië)
 NA:       en-NA: Namibia (Namibia)
 NA:      naq-NA: Namibia (Namibiab)
 NC:       fr-NC: New Caledonia (Nouvelle-Calédonie)
 NE:      dje-NE: Niger (Nižer)
 NE:       fr-NE: Niger (Niger)
 NE:  ha-Latn-NE: Niger (Nijar)
 NE:      twq-NE: Niger (Nižer)
 NF:       en-NF: Norfolk Island (Norfolk Island)
 NG:      bin-NG: Nigeria (Nigeria)
 NG:       en-NG: Nigeria (Nigeria)
 NG:       ff-NG: Nigeria (Nigeria)
 NG:  ha-Latn-NG: Nigeria (Najeriya)
 NG:      ibb-NG: Nigeria (Nigeria)
 NG:       ig-NG: Nigeria (Naịjịrịa)
 NG:       kr-NG: Nigeria (Nigeria)
 NG:       yo-NG: Nigeria (Orílẹ́ède Nàìjíríà)
 NI:       es-NI: Nicaragua (Nicaragua)
 NL:       en-NL: Netherlands (Netherlands)
 NL:       fy-NL: Netherlands (Nederlân)
 NL:      nds-NL: Netherlands (Nedderlannen)
 NL:       nl-NL: Netherlands (Nederland)
 NO:       nb-NO: Norway (Norge)
 NO:       nn-NO: Norway (Noreg)
 NO:       se-NO: Norway (Norga)
 NO:      sma-NO: Norway (Nöörje)
 NO:      smj-NO: Norway (Vuodna)
 NP:       ne-NP: Nepal (नेपाल)
 NR:       en-NR: Nauru (Nauru)
 NU:       en-NU: Niue (Niue)
 NZ:       en-NZ: New Zealand (New Zealand)
 NZ:       mi-NZ: New Zealand (Aotearoa)
 OM:       ar-OM: Oman (عمان)
 PA:       es-PA: Panama (Panamá)
 PE:       es-PE: Peru (Perú)
 PE:      quz-PE: Peru (Perú)
 PF:       fr-PF: French Polynesia (Polynésie française)
 PG:       en-PG: Papua New Guinea (Papua New Guinea)
 PH:       en-PH: Philippines (Philippines)
 PH:       es-PH: Philippines (Filipinas)
 PH:      fil-PH: Philippines (Pilipinas)
 PK:       en-PK: Pakistan (Pakistan)
 PK:  pa-Arab-PK: Pakistan (پاکستان)
 PK:  sd-Arab-PK: Pakistan (پاکستان)
 PK:       ur-PK: Pakistan (پاکستان)
 PL:       pl-PL: Poland (Polska)
 PM:       fr-PM: Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)
 PN:       en-PN: Pitcairn Islands (Pitcairn Islands)
 PR:       en-PR: Puerto Rico (Puerto Rico)
 PR:       es-PR: Puerto Rico (Puerto Rico)
 PS:       ar-PS: Palestinian Authority (السلطة الفلسطينية)
 PT:       pt-PT: Portugal (Portugal)
 PW:       en-PW: Palau (Palau)
 PY:       es-PY: Paraguay (Paraguay)
 PY:       gn-PY: Paraguay (Paraguái)
 QA:       ar-QA: Qatar (قطر)
 RE:       fr-RE: Réunion (La Réunion)
 RO:       ro-RO: Romania (România)
 RS:  sr-Cyrl-RS: Serbia (Србија)
 RS:  sr-Latn-RS: Serbia (Srbija)
 RU:       ba-RU: Russia (Рәсәй)
 RU:       ce-RU: Russia (Росси)
 RU:       cu-RU: Russia (рѡссі́а)
 RU:       os-RU: Russia (Уӕрӕсе)
 RU:       ru-RU: Russia (Россия)
 RU:      sah-RU: Russia (Россия)
 RU:       tt-RU: Russia (Россия)
 RW:       en-RW: Rwanda (Rwanda)
 RW:       fr-RW: Rwanda (Rwanda)
 RW:       rw-RW: Rwanda (U Rwanda)
 SA:       ar-SA: Saudi Arabia (المملكة العربية السعودية)
 SB:       en-SB: Solomon Islands (Solomon Islands)
 SC:       en-SC: Seychelles (Seychelles)
 SC:       fr-SC: Seychelles (Seychelles)
 SD:       ar-SD: Sudan (السودان)
 SD:       en-SD: Sudan (Sudan)
 SE:       en-SE: Sweden (Sweden)
 SE:       se-SE: Sweden (Ruoŧŧa)
 SE:      sma-SE: Sweden (Sveerje)
 SE:      smj-SE: Sweden (Svierik)
 SE:       sv-SE: Sweden (Sverige)
 SG:       en-SG: Singapore (Singapore)
 SG:       ms-SG: Singapore (Singapura)
 SG:       ta-SG: Singapore (சிங்கப்பூர்)
 SG:       zh-SG: Singapore (新加坡)
 SH:       en-SH: St Helena, Ascension, Tristan da Cunha (St Helena, Ascension, Tristan da Cunha)
 SI:       en-SI: Slovenia (Slovenia)
 SI:       sl-SI: Slovenia (Slovenija)
 SJ:       nb-SJ: Svalbard and Jan Mayen (Svalbard og Jan Mayen)
 SK:       sk-SK: Slovakia (Slovensko)
 SL:       en-SL: Sierra Leone (Sierra Leone)
 SM:       it-SM: San Marino (San Marino)
 SN:      dyo-SN: Senegal (Senegal)
 SN:  ff-Latn-SN: Senegal (Senegaal)
 SN:       fr-SN: Senegal (Sénégal)
 SN:       wo-SN: Senegal (Senegaal)
 SO:       ar-SO: Somalia (الصومال)
 SO:       so-SO: Somalia (Soomaaliya)
 SR:       nl-SR: Suriname (Suriname)
 SS:       ar-SS: South Sudan (جنوب السودان)
 SS:       en-SS: South Sudan (South Sudan)
 SS:      nus-SS: South Sudan (South Sudan)
 ST:       pt-ST: São Tomé and Príncipe (São Tomé e Príncipe)
 SV:       es-SV: El Salvador (El Salvador)
 SX:       en-SX: Sint Maarten (Sint Maarten)
 SX:       nl-SX: Sint Maarten (Sint-Maarten)
 SY:       ar-SY: Syria (سوريا)
 SY:       fr-SY: Syria (Syrie)
 SY:      syr-SY: Syria (ܣܘܪܝܐ)
 SZ:       en-SZ: Swaziland (Swaziland)
 SZ:       ss-SZ: Swaziland (Swaziland)
 TC:       en-TC: Turks and Caicos Islands (Turks and Caicos Islands)
 TD:       ar-TD: Chad (تشاد)
 TD:       fr-TD: Chad (Tchad)
 TG:       ee-TG: Togo (Togo nutome)
 TG:       fr-TG: Togo (Togo)
 TH:       th-TH: Thailand (ไทย)
 TJ:  tg-Cyrl-TJ: Tajikistan (Тоҷикистон)
 TK:       en-TK: Tokelau (Tokelau)
 TL:       pt-TL: Timor-Leste (Timor-Leste)
 TM:       tk-TM: Turkmenistan (Türkmenistan)
 TN:       ar-TN: Tunisia (تونس)
 TN:       fr-TN: Tunisia (Tunisie)
 TO:       en-TO: Tonga (Tonga)
 TO:       to-TO: Tonga (Tonga)
 TR:       tr-TR: Turkey (Türkiye)
 TT:       en-TT: Trinidad and Tobago (Trinidad and Tobago)
 TV:       en-TV: Tuvalu (Tuvalu)
 TW:       zh-TW: Taiwan (台灣)
 TZ:      asa-TZ: Tanzania (Tadhania)
 TZ:      bez-TZ: Tanzania (Hutanzania)
 TZ:       en-TZ: Tanzania (Tanzania)
 TZ:      jmc-TZ: Tanzania (Tanzania)
 TZ:      kde-TZ: Tanzania (Tanzania)
 TZ:      ksb-TZ: Tanzania (Tanzania)
 TZ:      lag-TZ: Tanzania (Taansanía)
 TZ:      mas-TZ: Tanzania (Tansania)
 TZ:      rof-TZ: Tanzania (Tanzania)
 TZ:      rwk-TZ: Tanzania (Tanzania)
 TZ:      sbp-TZ: Tanzania (Tansaniya)
 TZ:       sw-TZ: Tanzania (Tanzania)
 TZ:      vun-TZ: Tanzania (Tanzania)
 UA:       ru-UA: Ukraine (Украина)
 UA:       uk-UA: Ukraine (Україна)
 UG:      cgg-UG: Uganda (Uganda)
 UG:       en-UG: Uganda (Uganda)
 UG:       lg-UG: Uganda (Yuganda)
 UG:      nyn-UG: Uganda (Uganda)
 UG:       sw-UG: Uganda (Uganda)
 UG:      teo-UG: Uganda (Uganda)
 UG:      xog-UG: Uganda (Yuganda)
 UM:       en-UM: U.S. Outlying Islands (U.S. Outlying Islands)
 US: chr-Cher-US: United States (ᏌᏊ ᎢᏳᎾᎵᏍᏔᏅ ᏍᎦᏚᎩ)
 US:       en-US: United States (United States)
 US:       es-US: United States (Estados Unidos)
 US:      haw-US: United States (ʻAmelika Hui Pū ʻIa)
 US:      lkt-US: United States (Mílahaŋska Tȟamákȟočhe)
 UY:       es-UY: Uruguay (Uruguay)
 UZ:  uz-Cyrl-UZ: Uzbekistan (Ўзбекистон)
 UZ:  uz-Latn-UZ: Uzbekistan (Oʻzbekiston)
 VA:       it-VA: Vatican City (Città del Vaticano)
 VC:       en-VC: Saint Vincent and the Grenadines (Saint Vincent and the Grenadines)
 VE:       es-VE: Venezuela (Venezuela)
 VG:       en-VG: British Virgin Islands (British Virgin Islands)
 VI:       en-VI: U.S. Virgin Islands (U.S. Virgin Islands)
 VN:       vi-VN: Vietnam (Việt Nam)
 VU:       en-VU: Vanuatu (Vanuatu)
 VU:       fr-VU: Vanuatu (Vanuatu)
 WF:       fr-WF: Wallis and Futuna (Wallis-et-Futuna)
 WS:       en-WS: Samoa (Samoa)
 XK:       sq-XK: Kosovo (Kosovë)
 XK:  sr-Cyrl-XK: Kosovo (Косово)
 XK:  sr-Latn-XK: Kosovo (Kosovo)
 YE:       ar-YE: Yemen (اليمن)
 YT:       fr-YT: Mayotte (Mayotte)
 ZA:       af-ZA: South Africa (Suid-Afrika)
 ZA:       en-ZA: South Africa (South Africa)
 ZA:       nr-ZA: South Africa (South Africa)
 ZA:      nso-ZA: South Africa (Afrika Borwa)
 ZA:       ss-ZA: South Africa (South Africa)
 ZA:       st-ZA: South Africa (South Africa)
 ZA:       tn-ZA: South Africa (Aforika Borwa)
 ZA:       ts-ZA: South Africa (South Africa)
 ZA:       ve-ZA: South Africa (South Africa)
 ZA:       xh-ZA: South Africa (eMzantsi Afrika)
 ZA:       zu-ZA: South Africa (iNingizimu Afrika)
 ZM:      bem-ZM: Zambia (Zambia)
 ZM:       en-ZM: Zambia (Zambia)
 ZW:       en-ZW: Zimbabwe (Zimbabwe)
 ZW:       nd-ZW: Zimbabwe (Zimbabwe)
 ZW:  sn-Latn-ZW: Zimbabwe (Zimbabwe)

Edit: Updated to what is seen om my Windows 10 (version 1803 "April 2018 Update") machine, .NET Framework 4.7.2.



来源:https://stackoverflow.com/questions/223611/net-regioninfo-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!