locale_form_language_admin_edit_form_alter_submit

locale_form_language_admin_edit_form_alter_submit($form, FormStateInterface $form_state)

Form submission handler for language_admin_edit_form().

File

core/modules/locale/locale.module, line 730
Enables the translation of the user interface to languages other than English.

Code

function locale_form_language_admin_edit_form_alter_submit($form, FormStateInterface $form_state) {
  \Drupal::configFactory()->getEditable('locale.settings')->set('translate_english', intval($form_state->getValue('locale_translate_english')))->save();
}
doc_Drupal
2016-10-29 09:24:15
Comments
Leave a Comment

Please login to continue.