public void LoadData(Language defaultLanguage = null) { _mainControl.LanguageComboBox.SelectedValueChanged -= LanguageComboBox_SelectedValueChanged; var newLanguage = defaultLanguage ?? (Language)_mainControl.LanguageComboBox.SelectedItem; if (!string.IsNullOrWhiteSpace(_lastSelectedLanguage) && newLanguage.Code.Equals(_lastSelectedLanguage)) { return; } _lastSelectedLanguage = newLanguage.Code; _mainControl.LanguageValue.Text = newLanguage.Name; var pluginFolder = _pluginData.pluginFile.Directory?.FullName; _localizationRepository.LocalUpdate(pluginFolder, newLanguage.Code); _dataRepository.LocalUpdate(pluginFolder, newLanguage.Code); UpdateTranslations(); _mainControl.LanguageComboBox.SelectedIndexChanged -= LanguageComboBox_SelectedValueChanged; _mainControl.LanguageComboBox.SelectedIndexChanged += LanguageComboBox_SelectedValueChanged; }