简体   繁体   中英

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:

欢迎屏幕和新的用户帐户设置

地区和语言

高级设置

区域

Thanks, Adrian

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM