Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is CurrentUICulture "DE-DE" even though I have set up "DE-CH" in Windows

In my WPF application the CurrentUICulture is not properly taken over by Windows or is wrongly stored in Windows.

The region and language settings in Windows are in all places that I have found "Deutsch (Schweiz)". CurrentUICulture in the application displays "Deutsch (Deutschland)" instead of "Deutsch (Schweiz)". I've tested it on several computers (with domain user and local user).

Where could be the problem? Is there a place for this setting in Windows that is hard to find?

Important: I know that I can set the culture in the application. I do not need an answer like Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-ch")

I just want to find out how the mechanism works and where it gets the information from.

Here a few screenshots from my Windows settings:

welcome screen and new user accounts settings

region & language

advanced settings

region

Thanks, Adrian

like image 938
Adrian Avatar asked Nov 08 '22 15:11

Adrian


1 Answers

I suppose this is "by design" by Microsoft.

Please read this question. There is a pretty high upvoted comment on that:

Bear-in-mind that Microsoft, in their wisdom, don't separate the UI cultures of US English and (British) English or other Englishes. There's no MUI for English, which means the CurrentUICulture will always be en-US on an English-language machine, regardless of the CurrentCulture, which can be set to localise the Regional Settings.

While I'm not sure where this info comes from, your current OS behavior pretty confirms that: you change the regional settings (CurrentCulture), but the CurrentUICulture always stays "country agnostic" as "de-DE" (like "en-US" in the comment for any "en-*" regional setting).

like image 76
dymanoid Avatar answered Nov 14 '22 22:11

dymanoid