private void cmb_Loaded_1(object sender, RoutedEventArgs e) { cmb.Items.Add("en-US"); cmb.Items.Add("fr-FR"); } private void cmb_SelectionChanged(object sender, SelectionChangedEventArgs e) { var comboBox = sender as ComboBox; string value = comboBox.SelectedItem as string; Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(value); SelectLanguage(value); InitializeComponent(); }
private void SelectLanguage(string str) { // Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(str); switch (str) { case "en-US": TranslationManager.Instance.TranslationProvider = new ResxTranslationProvider ("WpfAppl.Global-en-US", Assembly.GetExecutingAssembly()); break; case "fr-FR": TranslationManager.Instance.TranslationProvider = new ResxTranslationProvider ("WpfAppl.Global-fr-FR", Assembly.GetExecutingAssembly()); break; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)