Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of All Countries in any Language? [duplicate]

Possible Duplicate:
Where can I get a list of all countries/cities to populate a listbox?

I've got a bit of a dilemma where I need a list of all the country names in German. I can get this info for English using the following code but I'm not sure how to do it for German. Any ideas?

 Dim countries As Generic.List(Of String) = New Generic.List(Of String)
     For Each ci As Globalization.CultureInfo In Globalization.CultureInfo.GetCultures(Globalization.CultureTypes.AllCultures And Globalization.CultureTypes.NeutralCultures)
         Dim ri As Globalization.RegionInfo = New Globalization.RegionInfo(ci.LCID)
         countries.Add(ri.EnglishName)
 Next ci
like image 782
Sonny Boy Avatar asked May 22 '09 16:05

Sonny Boy


People also ask

Which country has 37 language?

Bolivia. Although Zimbabwe is considered the country with the most official languages at a national level, Bolivia has a far higher number. Their Constitution recognizes 37 different languages on a regional level!

What country has 2 official language?

Belarus has two official languages: Belarusian and Russian.

Which country has 11 official language?

South Africa, however, has 11 – a number that could soon increase to 12 if the country's parliament accepts a recommendation to give South African Sign Language official status. Official languages have special legal status, and are the languages used within government.

Which country has more than 1 language?

Papua New Guinea is the most multilingual country, with over 839 living languages, according to Ethnologue, a catalogue of the world's known languages. The site ranked countries and territories based on the number of languages spoken as a first language within their borders.


1 Answers

The Unicode consortium maintains lists of locale translations in virtually all languages, including of course German. The data is stored in very straightforward XML files.

Download this zip file (core CLDR data) from the Unicode Consortium site and extract de.xml. All you want (and much more) is in there.

Countries: XPATH= /ldml/localeDisplayNames/territories/territory

The day you need the info in another language, just pick the matching xml file from the zip file (eg.: French = fr.xml).

like image 72
Serge Wautier Avatar answered Oct 14 '22 10:10

Serge Wautier