I have a Silverlight application. I want to store the last culture information used by the user. By default , the culture information is derived from the OS. Now if the user changes the culture in his/her login, when the next he/she logins, they should get the same culture. So the OS culture and Application may be different from next login. In short I want to save my last culture used in Isolated Storage in Silverlight. I have used : Thread.CurrentThread.CurrentUICulture.ToString() But I am not getting the expected results.
How to do it?
I would suggest you save both
CultureInfo.CurrentCulture.Name(for regional formatting) andCultureInfo.CurrentUICulture.Name(for language) as you may want user to use one of supported application languages (e.g. en-US) and local formatting (e.g. jp-JP).How do you restore the user settings from isolated storage? Do you assign
Thread.CurrentThread.CurrentCulturewhen application is initialized in App.xaml?Moreover, you may need to assign
Page.Languagefrom the settings (such as when a page is created, assign it as follows: