Exemplo n.º 1
0
        public void SwitchLanguage()
        {
            if (Thread.CurrentThread.CurrentUICulture.Name != "en-US")
            {
                Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            }
            else
            {
                Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");
            }
            OnPropertyChanged(() => this.LanguageName);

            LocalizedStrings strings = Application.Current.Resources["Strings"] as LocalizedStrings;

            if (strings != null)
            {
                strings.OnChange();
            }
        }