WinRT apps and Regional settings. The correct way to format dates and numbers based on the user's regional settings?

前端 未结 4 756
-上瘾入骨i
-上瘾入骨i 2020-12-02 10:40

I\'m having some problems in Windows 8 Metro apps (XAML & C#) regarding the user\'s regional settings. It seems that the apps won\'t respect user\'s regional set

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 11:20

    It is intentional. Microsoft is moving away from forcing applications to be in the language of the OS. Instead, each application uses information declared by the application (manifest languages, observable at Windows.Globalization.ApplicationLanguages.ManifestLanguages) and declared by the user (user languages, observable at Windows.System.UserProfile.GlobalizationPreferences.Languages) to determine how to display resources and globalized dates and times. This set of languages is called the application languages (observable at Windows.Globalization.ApplicationLanguages.Languages). The behavior you are seeing is because you are fiddling with the user languages and the manifest languages and you will get different application languages.

提交回复
热议问题