private void Language_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { var locale = I18nUtil.AvailableLangDic[(string)e.AddedItems[0]]; I18nUtil.SwitchToLang(locale); AppSettings.Default.Interface.Locale = locale; AppSettings.SaveDefault(); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var shown = (bool)value; if (System.Convert.ToString(parameter) == "string") { return(shown ? I18nUtil.GetString("ui-closeDesktopLyric") : I18nUtil.GetString("ui-openDesktopLyric")); } else if (System.Convert.ToString(parameter) == "bool") { return(shown); } else { return(null); } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var locked = (bool)value; return(locked ? I18nUtil.GetString("ui-unlockLyric") : I18nUtil.GetString("ui-lockLyric")); }
private void Application_Startup(object sender, StartupEventArgs e) { I18nUtil.LoadI18N(); }