RE: displaying country name in current UI culture?

Tech-Archive recommends: Speed Up your PC by fixing your registry



From: "Rich" <webstuff@xxxxxxxxxxxxxxxxxxxx>
| I have a two-letter country code and I need to display the name of this
| country in the current UI culture.
|
| Sadly I can't create a CultureInfo and use the DisplayName property
| because this displays it in the localised version of the .NET framework
| and not in the current UI culture which I might have changed (it is
| calculated regardless of the language that the system is set to
| display).

CultureInfo.NativeName is in the language of that culture. So if you're
looking for the native name of the current UI culture, use that.
CultureInfo.DisplayName is (as you found) based on the language of the .NET
framework.
CultureInfo.EnglishName is always the English name for the culture.

If you want to display the name of a culture in some other language (e.g.,
Framework is English, current UI is Spanish, and you want the name of
German culture in Spanish), I'm not sure how to get that.

Katy

.



Relevant Pages