views:

178

answers:

2

I have changed my locale to English/Great Britain (en-GB) as described here. When running my C# .NET application, I was expecting that Thread.CurrentThread.CurrentUICulture and Thread.CurrentThread.CurrentCulture would reflect this en-GB setting. However, I'm still getting en-US. Is there something that I'm missing?

A: 

Do you mean that you need to detect the culture change in real time, while the application is running? In that case, maybe this helps: http://stackoverflow.com/questions/652505/net-culture-change-event

Konamiman
I'm not sure that applies. I am not changing the culture of the application based on a setting. I've seen other documentation on putting the culture in an app.config file, read it in the app, and set Thread.CurrentThread.CurrentCulture accordingly. I have done this an it works. However, I would rather not have a culture configuration setting. I would rather the application just inherit the locale of the current machine. So, if someone has their version of Windows set to an Arabic/Egypt locale, then my app would use it's Arabic/Egypt resources.
bsh152s
+1  A: 

What you change in Control Panel is the user locale (used for formatting and sorting), not the UI locale (used for the language of the menu, dialogs, etc.) There is no en-GB localized Windows right now.

So the changes in Control Panel only affect the CurrentCulture, not the CurrentUICulture.

Mihai Nita