diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php index ca8e638..f011daf 100644 --- a/core/modules/user/lib/Drupal/user/AccountFormController.php +++ b/core/modules/user/lib/Drupal/user/AccountFormController.php @@ -197,6 +197,9 @@ public function form(array $form, array &$form_state) { '#description' => $interface_language_is_default ? t("This account's preferred language for e-mails and site presentation.") : t("This account's preferred language for e-mails."), ); + if (module_exists('language')) { + $negotiation_settings = variable_get('language_negotiation_language_interface', array()); + if (isset($negotiation_settings[LANGUAGE_NEGOTIATION_USER_ADMIN])) { $form['language']['preferred_admin_langcode'] = array( '#type' => 'language_select', '#title' => t('Administration pages language'), @@ -204,6 +207,8 @@ public function form(array $form, array &$form_state) { '#default_value' => $user_preferred_admin_langcode, '#access' => user_access('access administration pages', $account), ); + } + } // User entities contain both a langcode property (for identifying the // language of the entity data) and a preferred_langcode property (see