CODEDIGEST
Home » CodeDigest
Search
 

Technologies
 

Get All Language-Country Code List for all Culture in C#, ASP.Net
Submitted By Satheesh Babu B
On 4/8/2011 9:30:01 PM
Tags: ASP.Net,C#,CodeDigest  

Get All Language-Country Code List for all Culture in C#, ASP.Net

 

The below little code snippet will get all the available culture and print it in tabular format. The output of the code is given below,

 

 

protected void Page_Load(object sender, EventArgs e)

    {

        CultureInfo[] cinfo = CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures);

        Response.Write("<table border=\"1\"><tr><th>Country Name</th><th>Language-Country code</th></tr>");

        foreach (CultureInfo cul in cinfo)

        {

            Response.Write("<tr>");

            Response.Write("<td>" + cul.DisplayName + " </td><td> " + cul.Name + "</td>");

            Response.Write("</tr>");

        }

        Response.Write("</table>");

    }

 

Include System.Globalization namespace for the above code to work.

 

List of Language-Country code list Using CultureInfo in C# and ASP.Net

 

Country Name

Language-Country code

Arabic (Saudi Arabia)

ar-SA

Bulgarian (Bulgaria)

bg-BG

Catalan (Catalan)

ca-ES

Chinese (Taiwan)

zh-TW

Czech (Czech Republic)

cs-CZ

Danish (Denmark)

da-DK

German (Germany)

de-DE

Greek (Greece)

el-GR

English (United States)

en-US

Finnish (Finland)

fi-FI

French (France)

fr-FR

Hebrew (Israel)

he-IL

Hungarian (Hungary)

hu-HU

Icelandic (Iceland)

is-IS

Italian (Italy)

it-IT

Japanese (Japan)

ja-JP

Korean (Korea)

ko-KR

Dutch (Netherlands)

nl-NL

Norwegian, Bokmål (Norway)

nb-NO

Polish (Poland)

pl-PL

Portuguese (Brazil)

pt-BR

Romanian (Romania)

ro-RO

Russian (Russia)

ru-RU

Croatian (Croatia)

hr-HR

Slovak (Slovakia)

sk-SK

Albanian (Albania)

sq-AL

Swedish (Sweden)

sv-SE

Thai (Thailand)

th-TH

Turkish (Turkey)

tr-TR

Urdu (Islamic Republic of Pakistan)

ur-PK

Indonesian (Indonesia)

id-ID

Ukrainian (Ukraine)

uk-UA

Belarusian (Belarus)

be-BY

Slovenian (Slovenia)

sl-SI

Estonian (Estonia)

et-EE

Latvian (Latvia)

lv-LV

Lithuanian (Lithuania)

lt-LT

Persian (Iran)

fa-IR

Vietnamese (Vietnam)

vi-VN

Armenian (Armenia)

hy-AM

Azeri (Latin, Azerbaijan)

az-Latn-AZ

Basque (Basque)

eu-ES

Macedonian (Former Yugoslav Republic of Macedonia)

mk-MK

Afrikaans (South Africa)

af-ZA

Georgian (Georgia)

ka-GE

Faroese (Faroe Islands)

fo-FO

Hindi (India)

hi-IN

Malay (Malaysia)

ms-MY

Kazakh (Kazakhstan)

kk-KZ

Kyrgyz (Kyrgyzstan)

ky-KG

Kiswahili (Kenya)

sw-KE

Uzbek (Latin, Uzbekistan)

uz-Latn-UZ

Tatar (Russia)

tt-RU

Punjabi (India)

pa-IN

Gujarati (India)

gu-IN

Tamil (India)

ta-IN

Telugu (India)

te-IN

Kannada (India)

kn-IN

Marathi (India)

mr-IN

Sanskrit (India)

sa-IN

Mongolian (Cyrillic, Mongolia)

mn-MN

Galician (Galician)

gl-ES

Konkani (India)

kok-IN

Syriac (Syria)

syr-SY

Divehi (Maldives)

dv-MV

Arabic (Iraq)

ar-IQ

Chinese (People's Republic of China)

zh-CN

German (Switzerland)

de-CH

English (United Kingdom)

en-GB

Spanish (Mexico)

es-MX

French (Belgium)

fr-BE

Italian (Switzerland)

it-CH

Dutch (Belgium)

nl-BE

Norwegian, Nynorsk (Norway)

nn-NO

Portuguese (Portugal)

pt-PT

Serbian (Latin, Serbia)

sr-Latn-CS

Swedish (Finland)

sv-FI

Azeri (Cyrillic, Azerbaijan)

az-Cyrl-AZ

Malay (Brunei Darussalam)

ms-BN

Uzbek (Cyrillic, Uzbekistan)

uz-Cyrl-UZ

Arabic (Egypt)

ar-EG

Chinese (Hong Kong S.A.R.)

zh-HK

German (Austria)

de-AT

English (Australia)

en-AU

Spanish (Spain)

es-ES

French (Canada)

fr-CA

Serbian (Cyrillic, Serbia)

sr-Cyrl-CS

Arabic (Libya)

ar-LY

Chinese (Singapore)

zh-SG

German (Luxembourg)

de-LU

English (Canada)

en-CA

Spanish (Guatemala)

es-GT

French (Switzerland)

fr-CH

Arabic (Algeria)

ar-DZ

Chinese (Macao S.A.R.)

zh-MO

German (Liechtenstein)

de-LI

English (New Zealand)

en-NZ

Spanish (Costa Rica)

es-CR

French (Luxembourg)

fr-LU

Arabic (Morocco)

ar-MA

English (Ireland)

en-IE

Spanish (Panama)

es-PA

French (Principality of Monaco)

fr-MC

Arabic (Tunisia)

ar-TN

English (South Africa)

en-ZA

Spanish (Dominican Republic)

es-DO

Arabic (Oman)

ar-OM

English (Jamaica)

en-JM

Spanish (Venezuela)

es-VE

Arabic (Yemen)

ar-YE

English (Caribbean)

en-029

Spanish (Colombia)

es-CO

Arabic (Syria)

ar-SY

English (Belize)

en-BZ

Spanish (Peru)

es-PE

Arabic (Jordan)

ar-JO

English (Trinidad and Tobago)

en-TT

Spanish (Argentina)

es-AR

Arabic (Lebanon)

ar-LB

English (Zimbabwe)

en-ZW

Spanish (Ecuador)

es-EC

Arabic (Kuwait)

ar-KW

English (Republic of the Philippines)

en-PH

Spanish (Chile)

es-CL

Arabic (U.A.E.)

ar-AE

Spanish (Uruguay)

es-UY

Arabic (Bahrain)

ar-BH

Spanish (Paraguay)

es-PY

Arabic (Qatar)

ar-QA

Spanish (Bolivia)

es-BO

Spanish (El Salvador)

es-SV

Spanish (Honduras)

es-HN

Spanish (Nicaragua)

es-NI

Spanish (Puerto Rico)

es-PR

Sami, Southern (Norway)

sma-NO

Serbian (Cyrillic, Bosnia and Herzegovina)

sr-Cyrl-BA

Zulu

zu-ZA

Xhosa

xh-ZA

Frisian (Netherlands)

fy-NL

Setswana (South Africa)

tn-ZA

Sami, Northern (Sweden)

se-SE

Sami, Southern (Sweden)

sma-SE

Filipino (Philippines)

fil-PH

Sami, Inari (Finland)

smn-FI

Quechua (Peru)

quz-PE

Sami, Northern (Finland)

se-FI

Sami, Skolt (Finland)

sms-FI

Welsh

cy-GB

Croatian (Bosnia and Herzegovina)

hr-BA

Inuktitut (Latin, Canada)

iu-Latn-CA

Bosnian (Cyrillic, Bosnia and Herzegovina)

bs-Cyrl-BA

Mohawk (Mohawk)

moh-CA

Sami, Lule (Norway)

smj-NO

Mapudungun (Chile)

arn-CL

Maori

mi-NZ

Quechua (Ecuador)

quz-EC

Irish (Ireland)

ga-IE

Romansh (Switzerland)

rm-CH

Serbian (Latin, Bosnia and Herzegovina)

sr-Latn-BA

Sami, Lule (Sweden)

smj-SE

Luxembourgish (Luxembourg)

lb-LU

Sesotho sa Leboa (South Africa)

ns-ZA

Quechua (Bolivia)

quz-BO

Sami, Northern (Norway)

se-NO

Maltese

mt-MT

Bosnian (Latin, Bosnia and Herzegovina)

bs-Latn-BA

 

Happy Coding!!

Do you have a working code that can be used by anyone? Submit it here. It may help someone in the community!!

Recent Codes
  • View All Codes..