Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mapping strings to country codes
AD,Andorra
AD,Andorran
AE,United Arab Emirates
AE,Emirati
AE,Emirian
AE,Emiri
AE,UAE
AF,Afghanistan
AF,Afghan
AF,Afghani
AG,Antigua
AG,Antiguan
AG,Barbuda
AG,Barbudan
AI,Anguilla
AI,Anguillan
AL,Albania
AL,Albanian
AM,Armenia
AM,Armenian
AM,Hayastani
AN,Netherlands Antilles
AO,Angola
AO,Angolan
AQ,Antarctica
AQ,Antarctican
AR,Argentina
AR,Argentinean
AR,Argentine
AR,Argentinian
AS,Samoa
AS,Samoan
AT,Austria
AT,Austrian
AU,Australia
AU,Australian
AW,Aruba
AZ,Azerbaijan
AZ,Azerbaijani
AZ,Azeri
BA,Bosnia
BA,Bosnian
BA,Herzegovina
BB,Barbados
BB,Barbadian
BB,Bajan
BD,Bangladesh
BD,Bangladeshi
BE,Belgium
BE,Belgian
BF,Burkina
BF,Faso
BF,Burkinabe
BG,Bulgaria
BG,Bulgarian
BH,Bahrain
BH,Bahraini
BI,Burundi
BJ,Benin
BJ,Beninese
BJ,Beninois
BM,Bermuda
BM,Bermudian
BN,Brunei
BN,Bruneian
BN,Darussalam
BO,Bolivia
BO,Bolivian
BR,Brazil
BR,Brazilian
BS,Bahamas
BS,Bahamian
BT,Bhutan
BT,Bhutanese
BV,Bouvet
BW,Botswana
BY,Belarus
BY,Belarusian
BZ,Belize
BZ,Belizean
CA,Canada
CA,Canadian
CA,Canadien
CC,Cocos
CC,Keeling
CF,Centrafrique
CF,Central African Republic
CG,Congo
CG,Congolese
CI,Cote
CH,Switzerland
CH,Swiss
CK,Cook Islands
CL,Chile
CL,Chilean
CM,Cameroon
CM,Cameroonian
CN,China
CN,Chinese
CN,Chino
CN,PRC
CO,Colombia
CO,Colombian
CR,Costa Rica
CR,Costa Rican
CV,Cape Verde
CX,Christmas Island
CY,Cyprus
CY,Cypriot
CZ,Czech
DE,Germany
DE,German
DE,Germani
DJ,Djibouti
DK,Denmark
DK,Danish
DK,Dane
DM,Dominica
DM,Dominican
DO,Dominican Republic
DZ,Algeria
DZ,Algerian
EC,Ecuador
EC,Ecuadorian
EE,Estonia
EE,Estonian
EG,Egypt
EG,Egyptian
EH,Sahara
ER,Eritrea
ER,Eritrean
ES,Spain
ES,Spanish
ES,Spaniard
ET,Ethiopia
ET,Ethiopian
FI,Finland
FI,Finnish
FJ,Fiji
FJ,Fijian
FK,Falkland
FM,Micronesia
FM,Micronesian
FO,Faroe
FR,France
FR,French
GA,Gabon
GA,Gabonese
GB,United Kingdom
GB,UK
GB,England
GB,Britain
GB,British
GD,Grenada
GD,Grenadian
GE,Georgia
GE,Georgian
GF,Guiana
GH,Ghana
GH,Ghanaian
GI,Gibraltar
GI,Gibraltarian
GL,Greenland
GL,Greenlandic
GM,Gambia
GM,Gambian
GQGN,Guinea
GQGN,Guinean
GP,Guadeloupe
GP,Guadeloupean
GR,Greece
GR,Greek
GS,South Georgia
GS,South Georgian
GS,South Sandwich Islands
GT,Guatemala
GT,Guatemalan
GU,Guam
GU,Guamanian
GW,Guinea-Bissau
GW,Guinea Bissau
GW,Bissau Guinea
GW,Bissau Guinean
GY,Guyana
GY,Guyanese
HK,Hong Kong
HK,Hong Kongese
HK,Hongkonger
HM,McDonald Islands
HN,Honduras
HN,Honduran
HN,Catracho
HR,Croatia
HR,Croatian
HT,Haiti
HT,Haitian
HU,Hungary
HU,Hungarian
ID,Indonesia
ID,Indonesian
IE,Ireland
IE,Irish
IL,Israel
IL,Israeli
IM,Isle of Man
IM,Manx
IN,India
IN,Indian
IO,British Indian Ocean Territory
IQ,Iraq
IQ,Iraqi
IS,Iceland
IS,Icelander
IT,Italy
IT,Italian
JM,Jamaica
JM,Jamaican
JO,Jordan
JO,Jordanian
JP,Japan
JP,Japanese
KE,Kenya
KE,Kenyan
KG,Kyrgyzstan
KG,Kyrgyz
KH,Cambodia
KH,Khmer
KH,Cambodian
KI,Kiribati
KI,I-Kiribati
KM,Comoros
KM,Comorian
KN,Saint Kitts
KN,Nevis
KN,Kittian
KN,Nevisian
KR,South Korea
KR,Korea
KR,Korean
KW,Kuwait
KW,Kuwaiti
KY,Cayman
KY,Caymanian
KZ,Kazakhstan
KZ,Kazakhstani
LA,Lao
LA,Laos
LA,Laotian
LB,Lebanon
LB,Lebanese
LC,Saint Lucia
LC,Saint Lucian
LI,Liechtenstein
LI,Liechtensteiner
LI,Liechtensteinerin
LK,Sri Lanka
LK,Sri Lankan
LR,Liberia
LR,Liberian
LS,Lesotho
LS,Mosotho
LS,Basotho
LT,Lithuania
LT,Lithuanian
LU,Luxembourg
LU,Luxembourger
LV,Latvia
LV,Latvian
LY,Libya
LY,Libyan
MA,Morocco
MA,Moroccan
MC,Monaco
MC,Monégasque
MC,Monegasque
MC,Monacan
MD,Moldova
MD,Moldovan
MG,Madagascar
MG,Malagasy
MH,Marshall Islands
MH,Marshallese
MK,Macedonia
MK,Macedonian
ML,Mali
ML,Malian
MN,Mongolia
MN,Mongolian
MO,Macau
MO,Macanese
MP,Mariana Islands
MQ,Martinique
MQ,Martinican
MQ,Martiniquais
MQ,Martiniquaise
MR,Mauritania
MR,Mauritanian
MS,Montserrat
MS,Montserratian
MT,Malta
MT,Maltese
MU,Mauritius
MU,Mauritian
MV,Maldives
MV,Maldivian
MW,Malawi
MW,Malawian
MX,Mexico
MX,Mexican
MY,Malaysia
MY,Malaysian
MZ,Mozambiq
MZ,Mozambique
MZ,Mozambican
NA,Namibia
NA,Namibian
NC,Caledonia
NC,Caledonian
NE,Niger
NE,Nigerien
NF,Norfolk
NG,Nigeria
NG,Nigerian
NI,Nicaragua
NI,Nicaraguan
NI,Nica
NI,Pinolero
NI,Nicoya
NL,Netherlands
NL,Dutch
NL,Holland
NL,Hollander
NO,Norway
NO,Norwegian
NP,Nepal
NP,Nepali
NP,Nepalese
NR,Nauru
NR,Nauruan
NU,Niue
NU,Niuean
NZ,New Zealand
NZ,New Zealander
NZ,Kiwi
OM,Oman
OM,Omani
PA,Panama
PA,Panamanian
PE,Peru
PE,Peruvian
PF,Polynesia
PF,Polynesian
PG,Papua New Guinea
PG,Papua New Guinean
PH,Philippines
PH,Filipino
PH,Filipina
PH,Pinoy
PH,Pinay
PH,Philippine
PK,Pakistan
PK,Pakistani
PL,Poland
PL,Polish
PM,St Pierre
PM,Miquelon
PM,Saint-Pierrais
PM,Miquelonnais
PN,Pitcairn
PR,Puerto Rico
PR,Puerto Rican
PR,Boricua
PS,Palestinian Territory
PS,Palestinians
PT,Portugal
PT,Portuguese
PW,Palau
PW,Palauan
PY,Paraguay
PY,Paraguayan
QA,Qatar
QA,Qatari
RE,Reunion
RO,Romania
RO,Romanian
CSRS,Serbia
CSRS,Serbian
RU,Russia
RU,Russian
RU,Soviet Union
RW,Rwanda
RW,Rwandan
RW,Rwandese
SA,Saudi
SB,Solomon Islands
SB,Solomon Islander
SC,Seychelles
SC,Seychellois
SC,Seychelloise
SC,Seselwa
SE,Sweden
SE,Swedish
SE,Swede
SG,Singapore
SG,Singaporean
SH,St Helena
SH,Saint Helena
SI,Slovenia
SI,Slovene
SJ,Svalbard
SJ,Jan Mayen Islands
SK,Slovakia
SK,Slovak
SL,Sierra Leone
SL,Sierra Leonean
SM,San Marino
SM,Sammarinese
SN,Senegal
SN,Senegalese
SO,Somalia
SO,Somali
SO,Somalian
SR,Suriname
SR,Surinamese
ST,Sao Tome
ST,São Toméan
ST,Sao Tomean
ST,Santomean
ST,Principe
SV,Salvador
SV,Salvadoran
SZ,Swaziland
SZ,Swazi
TC,Turks and Caicos Islands
TC,Turks and Caicos Islander
TC,Caicos
TD,Chad
TD,Chadian
TF,French Southern Territories
TG,Togo
TG,Togolese
TH,Thailand
TH,Thai
TJ,Tajikistan
TJ,Tajikistani
TK,Tokelau
TK,Tokelauan
TL,Timor
TL,Timorese
TM,Turkmenistan
TM,Turkmen
TN,Tunisia
TN,Tunisian
TO,Tonga
TO,Tongan
TR,Turkey
TR,Turkish
TT,Trinidad
TT,Tobago
TT,Trinidadian
TT,Trini
TV,Tuvalu
TV,Tuvaluan
TW,Taiwan
TW,Taiwanese
TZ,Tanzania
TZ,Tanzanian
UA,Ukraine
UA,Ukrainian
UG,Uganda
UG,Ugandan
UM,Minor Outlying Islands
US,United States
US,USA
US,US
UY,Uruguay
UY,Uruguayan
UZ,Uzbekistan
UZ,Uzbek
VA,Vatican
VA,Holy See
VC,Saint Vincent
VC,Grenadines
VC,Vincentian
VE,Venezuela
VE,Venezuelan
VI,Virgin Islands
VI,Virgin Islander
VN,Viet Nam
VN,Vietnam
VN,Vietnamese
VU,Vanuatu
VU,Ni-Vanuatu
WF,Wallis
WF,Futuna
WF,Wallisian
WF,Futunan
WS,Samoa
WS,Samoan
YE,Yemen
YE,Yemeni
YT,Mayotte
YT,Mahoran
ZA,South Africa
ZA,South African
ZM,Zambia
ZM,Zambian
ZW,Zimbabwe
ZW,Zimbabwean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment