function hook_language_fallback_candidates_alter
Same name and namespace in other branches
- 9 core/modules/language/language.api.php \hook_language_fallback_candidates_alter()
- 8.9.x core/modules/language/language.api.php \hook_language_fallback_candidates_alter()
- 10 core/modules/language/language.api.php \hook_language_fallback_candidates_alter()
- 11.x core/modules/language/language.api.php \hook_language_fallback_candidates_alter()
Perform alterations on the language fallback candidates.
Parameters
$fallback_candidates: An array of language codes whose order will determine the language fallback order.
Related topics
1 function implements hook_language_fallback_candidates_alter()
Note: the procedural functions in this list are found by pattern matching, so the list may include some functions that are not actually implementations of this hook.
- LanguageTestHooks::languageFallbackCandidatesAlter in core/
modules/ language/ tests/ language_test/ src/ Hook/ LanguageTestHooks.php - Implements hook_language_fallback_candidates_alter().
1 invocation of hook_language_fallback_candidates_alter()
- language_fallback_get_candidates in includes/
language.inc - Returns the possible fallback languages ordered by language weight.
File
-
modules/
system/ language.api.php, line 180
Code
function hook_language_fallback_candidates_alter(array &$fallback_candidates) {
$fallback_candidates = array_reverse($fallback_candidates);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.