function language_test_page_top

Same name in other branches
  1. 8.9.x core/modules/language/tests/language_test/language_test.module \language_test_page_top()
  2. 10 core/modules/language/tests/language_test/language_test.module \language_test_page_top()
  3. 11.x core/modules/language/tests/language_test/language_test.module \language_test_page_top()

Implements hook_page_top().

File

core/modules/language/tests/language_test/language_test.module, line 15

Code

function language_test_page_top() {
    if (\Drupal::moduleHandler()->moduleExists('language')) {
        language_test_store_language_negotiation();
        \Drupal::messenger()->addStatus(t('Language negotiation method: @name', [
            '@name' => \Drupal::languageManager()->getNegotiatedLanguageMethod() ?? 'Not defined',
        ]));
    }
}

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