19

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
Community
  • 1
  • 1
Sonny Boy
  • 7,848
  • 18
  • 76
  • 104

5 Answers5

23

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).

Serge Wautier
  • 21,494
  • 13
  • 69
  • 110
1

From the MSDN, the comment says "Gets the full name of the country/region in the language of the localized version of .NET Framework" for the Property DisplayName.

If you have a German .net Framework, it should be in German.

Daniel Fabian
  • 3,828
  • 2
  • 19
  • 28
  • 1
    "If you have a German .net Framework" ... and your current UICulture is German. – Joe May 22 '09 at 16:40
0

There is a list according to ISO 3166 available at Deutsche Nationalbibliothek:

http://www.d-nb.de/standardisierung/pdf/laendercodes_alph.pdf

A list with English names can be obtained from ISO:

http://www.iso.ch/iso/country_codes/iso_3166_code_lists.htm

Update: With a German localization of the .NET Framework you can use the DisplayName property of the RegionInfo class to get the localized German country name.

Dirk Vollmar
  • 172,527
  • 53
  • 255
  • 316
0

A quick Googling revealed this page, which contains a list of quite a lot of countries in German. The list is available in 15 languages on the site. You can probably scrape the data from it and make an XML file to load dynamically if you don't want to rely on the framework language.

lc.
  • 113,939
  • 20
  • 158
  • 187
0

Wikipedia has a List of sovereign states. As this wiki page has been translated into almost any language I suppose you can screenscrape the information there.

lothar
  • 19,853
  • 5
  • 45
  • 59