Skip to content
Snippets Groups Projects
Verified Commit 3bb74510 authored by James Williams's avatar James Williams
Browse files

Merge branch '2.x' into 3431546-d11_ready

parents ff77c531 acf949d8
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,6 @@ name: Language Hierarchy
type: module
description: 'Allows users to configure inheritance between languages.'
package: Multilingual
core_version_requirement: ^10 || ^11
core_version_requirement: ^8 || ^9 || ^10 || ^11
dependencies:
- drupal:language
......@@ -18,6 +18,23 @@ use Drupal\language\ConfigurableLanguageInterface;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\views\ViewExecutable;
/**
* Implements hook_module_implements_alter().
*/
function language_hierarchy_module_implements_alter(&$implementations, $hook) {
switch ($hook) {
case 'language_fallback_candidates_path_alias_alter':
// Ensure language_hierarchy_language_fallback_candidates_alter() would
// run after path_alias_language_fallback_candidates_path_alias_alter().
if (isset($implementations['language_hierarchy']) && isset($implementations['path_alias'])) {
$group = $implementations['language_hierarchy'];
unset($implementations['language_hierarchy']);
$implementations['language_hierarchy'] = $group;
}
break;
}
}
/**
* Implements hook_language_fallback_candidates_alter().
*/
......
logo.png 0 → 100644
logo.png

58.8 KiB

......@@ -26,7 +26,7 @@ class LocaleConfigSubscriberTest extends CoreLocaleConfigSubscriberTest {
/**
* {@inheritdoc}
*/
protected function setUpLanguages() {
protected function setUpLanguages(): void {
$this->installSchema('language_hierarchy', ['language_hierarchy_priority']);
parent::setUpLanguages();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment