function hook_language_negotiation_info_alter

hook_language_negotiation_info_alter(array &$negotiation_info)

Perform alterations on language negotiation methods.

Parameters

array $negotiation_info: Array of language negotiation method definitions.

Related topics

Hooks
Define functions that alter the behavior of Drupal core.

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';
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!language!language.api.php/function/hook_language_negotiation_info_alter/8.1.x