Reputation: 10971
I have a windows store app that supports English (LTR) and Arabic (RTL).
I want to add an option in the settings to enable the user to change the app culture from English to Arabic and vice versa.
I want the string resources and the UI flow direction to change immediately without having to restart the application.
how can this be done ?
Upvotes: 3
Views: 858
Reputation: 129
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = "de-DE";
Only works if put AFTER the "Frame rootFrame" creation in App OnLaunched event. I use to develop using one language at design time and another at runtime, what makes easy to check the use of resources.
Upvotes: 0
Reputation: 10620
Use this for changing the culture (not sure abot the LTR/RTL). Let me know, if it works. Maybe you would need to refresh localization bindings after setting the new culture.
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = "de-DE";
Upvotes: 1