I want to internationalize my WP7 app. I have localized resources开发者_如何学Python, SupportedCultures
tag etc. But I'm wondering who is responsible for setting the Thread.CurrentThread.Current*Culture
? Is this set for me when the user changes their language on the device or do I have to detect the device language / region and set the thread culture accordingly?
Thanks!
You can use the CultureInfo.CurrentCulture
property to determine the current region that has been set for the device. This is set by the framework; you do not have to set it yourself. If you need to change the locale for some reason, you can set the Thread.CurrentThread.CurrentCulture
and Thread.CurrentThread.CurrentUICulture
properties.
You can test localized applications in the emulator by changing the region in the settings.
精彩评论