internal void Change(Localization localization) { var resDict = Application.Current.Resources.MergedDictionaries.Where(d => d.Source == Selected.Uri).First(); resDict.Source = localization.Uri; Selected = localization; }
public LocalizationManager() { var language = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName.ToUpper(); Selected = FindNameOrDefault(language); Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = Selected.Uri }); }