1

I am working on an asp.net page. I have a dropdownlist for countries and countries are filled/hardcoded in aspx page. I want to make this coutry dropdownlist localized so that If culture is French, country names appear in french and If culture name is Germany, then country names appear in German.

I tried following link, but it is not working:

http://geekswithblogs.net/aghausman/archive/2009/07/26/get-countries-name-in-.net.aspx

Do I need to use Db or I can do it without DB.

Please suggest how to do it.

DotnetSparrow
  • 27,428
  • 62
  • 183
  • 316

1 Answers1

0

You'll have to save the localized names somewhere. It may be in DB or in IIS pool memory (meaning like static hardcoded variable somewhere) or loaded once from the file (csv, xml etc.). But it'd be good to keep these in resource files to achieve max compatibility with existing .net framework mechanisms.

Regarding your questions, here's the article that describes just this situation. Basically, you set your UICulture to "auto" (meaning it will be taken from browser settings) and put localized resources in resx files.

Dmitry Reznik
  • 6,812
  • 2
  • 32
  • 27
  • I tried using objRegionInfo.NativeName and it shows each country name in its language but I want all country names in current culture. All in german, all in french and so on. also, with objRegionInfo.NativeName, I see boxes instead of characters, these words doesn't seem to be supported. – DotnetSparrow Apr 16 '12 at 08:07