Same name and namespace in other branches
  1. 7.x modules/system/language.api.php \hook_language_negotiation_info_alter()
  2. 8.9.x core/modules/language/language.api.php \hook_language_negotiation_info_alter()
  3. 9 core/modules/language/language.api.php \hook_language_negotiation_info_alter()

Perform alterations on language negotiation methods.

Parameters

array $negotiation_info: Array of language negotiation method definitions.

Related topics

1 function implements hook_language_negotiation_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

language_test_language_negotiation_info_alter in core/modules/language/tests/language_test/language_test.module
Implements hook_language_negotiation_info_alter().
1 invocation of hook_language_negotiation_info_alter()
LanguageNegotiationMethodManager::__construct in core/modules/language/src/LanguageNegotiationMethodManager.php
Constructs a new LanguageNegotiationMethodManager object.

File

core/modules/language/language.api.php, line 74
Hooks provided by the Language module.

Code

function hook_language_negotiation_info_alter(array &$negotiation_info) {
  if (isset($negotiation_info['custom_language_method'])) {
    $negotiation_info['custom_language_method']['config'] = 'admin/config/regional/language/detection/custom-language-method';
  }
}