RE: displaying country name in current UI culture?
- From: katyk@xxxxxxxxxxxxxxxxxxxx (Katy King)
- Date: Fri, 06 May 2005 20:05:08 GMT
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
.
- Follow-Ups:
- RE: displaying country name in current UI culture?
- From: Rich Urwin
- RE: displaying country name in current UI culture?
- References:
- Prev by Date: Adding literals to an existing Enum at runtime
- Next by Date: Re: Adding literals to an existing Enum at runtime
- Previous by thread: displaying country name in current UI culture?
- Next by thread: RE: displaying country name in current UI culture?
- Index(es):
Relevant Pages
|