private void cbLanguages_SelectedIndexChanged(object sender, EventArgs e) { var lang = (cbLanguages.SelectedItem != null && !string.IsNullOrEmpty(cbLanguages.SelectedItem.ToString())) ? cbLanguages.SelectedItem.ToString() : string.Empty; Localizer.GlobalInstance.CurrentLanguage = Localizer.GlobalInstance.GetLanguageNameByLongName(lang); EventDistributor.InvokeLanguageChanged(this); }
private void cbWelcomeLanguages_SelectedIndexChanged(object sender, EventArgs e) { Language lang = cbWelcomeLanguages.SelectedItem as Language; if (lang != null) { OptionsController.SelectedLanguage = Localizer.GlobalInstance.GetLanguageNameByLongName(lang.LongName); ControlTranslator.TranslateControls(Localizer.GlobalInstance, this); EventDistributor.InvokeLanguageChanged(this); } }