On my Windows Server 2008 R2 server, I’ve set the:
“Region and Language” -> “Formats” -> “Danish (Denmark”
When I see the settings here, and when I click the “Additional Settings”, it seems correct. However, in my application, it is not set correct. Here my output is still American.
For instance, these two situations I get the problem:
- Datetime.ToString() gives 11/4/2012 1:18:38 PM instead of 04/11/2012 13:18:38 .
- When I input a double with 50,00 it is ignored and is set to 5000. When using a dot, it works. it should be a decimal
Of course I could all set this in the application specifically, but I wonder why it is set to English as default when I’ve set the Formats to Danish.
I’ve also set the following:
- Location = “Denmark”
- Default Input Language = “Danish”
How do I fix it? 🙂
ASP.NET runs under a different user account, so you’ll need to copy the regional settings across.
In the Region and Language control panel, on the Administrative tab, you should have a Copy settings… button. This will copy the settings from your account to the welcome screen, system accounts and new user accounts.
Another thing to check would be the
<globalization>section in yourweb.configfile – you might be picking up the culture settings from the user’s browser.