Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localized region/country names in .NET

Is it possible to retrieve a localized name of a country in .NET?

The RegionInfo class has only the EnglishName, DisplayName and NativeName - but it doesn't seem to be possible to get for example the local Danish name for "Austria" which is "Østrig". They will always return the English name, no matter which Culture or UICulture the thread runs with.

Is there a technique I can use, or will I have to create a data store for that?

like image 573
JacobE Avatar asked May 09 '09 10:05

JacobE


1 Answers

The localized names are only available if the framework has resources in the required language. Therefore, you need to install the language pack before DisplayName returns the wanted names (with the correct culture set in the application, of course).

Download the danish 3.5 SP1 language pack here (many other languages can be chosen as well).

like image 90
Lucero Avatar answered Sep 24 '22 16:09

Lucero