Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Who sets the thread culture in Windows Phone 7?

I want to internationalize my WP7 app. I have localized resources, 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!

like image 577
will Avatar asked Oct 11 '22 06:10

will


1 Answers

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.

like image 193
Derek Lakin Avatar answered Nov 17 '22 00:11

Derek Lakin