diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index dabf632..68b28ba 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -248,7 +248,7 @@ const LANGUAGE_ALL = 3; /** * The language state used when referring to the site's default language. */ -const LANGUAGE_DEFAULT = 4; +const LANGUAGE_SITE_DEFAULT = 4; /** * The type of language used to define the content language. @@ -2806,7 +2806,7 @@ function language_list($flags = LANGUAGE_CONFIGURABLE) { $filtered_languages = array(); // Add the site's default language if flagged as allowed value. - if ($flags & LANGUAGE_DEFAULT) { + if ($flags & LANGUAGE_SITE_DEFAULT) { $default = isset($default) ? $default : language_default(); // Rename the default language. $default->name = t("Site's default language (@lang_name)", array('@lang_name' => $default->name)); diff --git a/core/includes/language.inc b/core/includes/language.inc index 122670c..74d5752 100644 --- a/core/includes/language.inc +++ b/core/includes/language.inc @@ -411,7 +411,6 @@ function language_negotiation_info() { // Add the default language negotiation method. $negotiation_info[LANGUAGE_NEGOTIATION_SELECTED] = array( 'callbacks' => array( - 'language' => 'language_from_default', 'negotiation' => 'language_from_selected', ), 'weight' => 12, @@ -474,16 +473,6 @@ function language_negotiation_method_invoke($method_id, $method = NULL, $request return !empty($results[$method_id]) ? clone($results[$method_id]) : $results[$method_id]; } -/** - * Returns the default language code. - * - * @return - * The default language code. - */ -function language_from_default() { - return language_default()->langcode; -} - /** * Identifies language from configuration. * diff --git a/core/modules/language/language.admin.inc b/core/modules/language/language.admin.inc index 8affe0a..1fd971e 100644 --- a/core/modules/language/language.admin.inc +++ b/core/modules/language/language.admin.inc @@ -822,7 +822,7 @@ function language_negotiation_configure_selected_form($form, &$form_state) { $form['selected_langcode'] = array( '#type' => 'language_select', '#title' => t('Language'), - '#languages' => LANGUAGE_CONFIGURABLE | LANGUAGE_DEFAULT, + '#languages' => LANGUAGE_CONFIGURABLE | LANGUAGE_SITE_DEFAULT, '#default_value' => config('language.negotiation')->get('selected_langcode'), );