use of com.faforever.client.preferences.LocalizationPrefs in project downlords-faf-client by FAForever.
the class SettingsController method onLanguageSelected.
public void onLanguageSelected() {
LocalizationPrefs localizationPrefs = preferencesService.getPreferences().getLocalization();
if (Objects.equals(languageComboBox.getValue(), localizationPrefs.getLanguage())) {
return;
}
log.debug("A new language was selected: {}", languageComboBox.getValue());
localizationPrefs.setLanguage(languageComboBox.getValue());
preferencesService.storeInBackground();
notificationService.addNotification(new PersistentNotification(i18n.get("settings.languages.restart.message"), Severity.WARN, Collections.singletonList(new Action(i18n.get("settings.languages.restart"), event -> {
Platform.exit();
// FIXME reload application (stage & application context)
}))));
}
Aggregations