因此,在使用之前我使用了:
System.Threading.Thread.CurrentThread.CurrentCulture
如何在WP8.1中实现此功能?为什么所有过时的内容都没有好的文档,可以像xCode一样提供替代方案?
因此,在使用之前我使用了:
System.Threading.Thread.CurrentThread.CurrentCulture
CultureInfo.CurrentCulture 曾经返回区域格式设置,但 WP 8.1 现在似乎返回 Package.appxmanifest 中设置的默认语言。
有点糟糕,不是吗? :)
我认为这是计划中的,因为他们想引导我们使用 GlobalizationPreferences
。 所以要回到您想要的内容... 您需要做类似以下的事情:
CultureInfo ci = new CultureInfo(Windows.System.UserProfile.GlobalizationPreferences.Languages[0]);