예제 #1
0
        internal void Change(Localization localization)
        {
            var resDict = Application.Current.Resources.MergedDictionaries.Where(d => d.Source == Selected.Uri).First();

            resDict.Source = localization.Uri;
            Selected       = localization;
        }
예제 #2
0
        public LocalizationManager()
        {
            var language = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName.ToUpper();

            Selected = FindNameOrDefault(language);
            Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary()
            {
                Source = Selected.Uri
            });
        }