Windows 8 Metro App (XAML) - How to set default startup language?
Maybe setting it in App.xaml.cs like below will help
Windows.Globalization.ApplicationPreferences.PreferredLanguage = "no";
Where "no" is the BCP47 language tag for Norwegian.
Update : Change Metro App Language at Runtime
As per Windows 8 SDK Sample Resources and Application Localization
It is possible that the language, scale, contrast, or other settings may change while the application is running. To handle these events, event listeners must be registered to listen for and respond to the change. This can be done either by saving state and refreshing the page, or by redrawing certain resources.
Now in my language change select event I set PreferredLanguage as:
Windows.Globalization.ApplicationPreferences.PreferredLanguage = "en";
this.Frame.Navigate(this.GetType());
And the key thing I was missing is the code below in the App OnLaunched event:
ResourceManager.Current.DefaultContext.QualifierValues.MapChanged += async (s, m) =>
{
if (m.Key == "Language")
{
// react to language change
}
};
I did not place this event registration in the Page construtor or any page event (as in the SDK example) because then it could have been registered multiple times. However, this event must be logged somewhere when the language change takes effect at runtime.
source to share
I think what you are looking for (in CP) Windows.Globalization.ApplicationPreferences.PreferredLanguage.
Please note that your manifest must contain a list of all languages you support. VS will automatically install languages for you if the manifest in the project contains x-generate
.
source to share