function locale_test_language_negotiation_info

Implements hook_language_negotiation_info().

1 string reference to 'locale_test_language_negotiation_info'
LocaleLanguageNegotiationInfoFunctionalTest::testInfoAlterations in modules/locale/locale.test
Tests alterations to language types/negotiation info.

File

modules/locale/tests/locale_test.module, line 85

Code

function locale_test_language_negotiation_info() {
    if (variable_get('locale_test_language_negotiation_info', FALSE)) {
        $info = array(
            'callbacks' => array(
                'language' => 'locale_test_language_provider',
            ),
            'file' => drupal_get_path('module', 'locale_test') . '/locale_test.module',
            'weight' => -10,
            'description' => t('This is a test language provider.'),
        );
        return array(
            'test_language_provider' => array(
                'name' => t('Test'),
                'types' => array(
                    LANGUAGE_TYPE_CONTENT,
                    'test_language_type',
                    'fixed_test_language_type',
                ),
            ) + $info,
            'test_language_provider_ts' => array(
                'name' => t('Type-specific test'),
                'types' => array(
                    'test_language_type',
                ),
            ) + $info,
        );
    }
}

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