I'm displaying a country as part of some other information. The country is read out of a database as a country code.
This is done like so:
Location location = new Location()
{
Company = reader.GetString("Company"),
Address1 = reader.GetString("Address"),
Address2 = reader.GetString("Address2", string.Empty),
ZipCity = reader.GetString("ZipCity"),
Country = new RegionInfo(reader.GetString("Country", string.Empty)).DisplayName,
CountryCode = new RegionInfo(reader.GetString("Country", string.Empty)).TwoLetterISORegionName,
Att = reader.GetString("Att", string.Empty),
Phone = reader.GetString("Phone", string.Empty)
};
My problem is that I would really like to force the display name to be in danish. Mind you, the country will now always be denmark, so using native name is not an option.
Thank you very much in advance
So after checking into the possibility of installing a language pack for the .NET Framework, which for some reason wasn't possible for us, we found the following solution.
Add this line to your web.config under the system.web node.
<globalization enableClientBasedCulture="false" culture="da-DK" uiCulture="da"/>
If you have a OS language pack installed on the machine running your software, it will now be forced to that language.