I am trying to change the language my WPF app uses in a click event but it doesn’t change.
private void menuItemGerman_Click(object sender, RoutedEventArgs e)
{
Settings.Default.Culture = "de-DE";
Thread.CurrentThread.CurrentCulture = new CultureInfo(Settings.Default.Culture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Default.Culture);
}
What am I missing?
You changed the culture registered with the thread, and String.Format will use this now, but you need to reload all localized items in the WPF hierarchy.
WPF Localization – On-the-fly Language Selection has more information.