function language_test_page_top

Same name and namespace in other branches
  1. 9 core/modules/language/tests/language_test/language_test.module \language_test_page_top()
  2. 8.9.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.