function language_negotiation_info

Returns all the defined language negotiation providers.

Return value

An array of language negotiation providers.

Related topics

5 calls to language_negotiation_info()
language_negotiation_purge in includes/language.inc
Removes any unused language negotiation providers from the configuration.
language_negotiation_set in includes/language.inc
Saves a list of language negotiation providers.
language_provider_invoke in includes/language.inc
Helper function used to cache the language negotiation providers results.
language_types_set in includes/language.inc
Updates the language type configuration.
locale_languages_configure_form in modules/locale/locale.admin.inc
Setting for language negotiation options
3 string references to 'language_negotiation_info'
language_negotiation_purge in includes/language.inc
Removes any unused language negotiation providers from the configuration.
language_types_set in includes/language.inc
Updates the language type configuration.
LocaleLanguageNegotiationInfoFunctionalTest::languageNegotiationUpdate in modules/locale/locale.test
Update language types/negotiation information.

File

includes/language.inc, line 392

Code

function language_negotiation_info() {
    $language_providers =& drupal_static(__FUNCTION__);
    if (!isset($language_providers)) {
        // Collect all the module-defined language negotiation providers.
        $language_providers = module_invoke_all('language_negotiation_info');
        // Add the default language negotiation provider.
        $language_providers[LANGUAGE_NEGOTIATION_DEFAULT] = array(
            'callbacks' => array(
                'language' => 'language_from_default',
            ),
            'weight' => 10,
            'name' => t('Default'),
            'description' => t('Use the default site language (@language_name).', array(
                '@language_name' => language_default()->native,
            )),
        );
        // Let other modules alter the list of language negotiation providers.
        drupal_alter('language_negotiation_info', $language_providers);
    }
    return $language_providers;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.