diff --git a/src/Utility.php b/src/Utility.php index b4895ed6..b4738127 100644 --- a/src/Utility.php +++ b/src/Utility.php @@ -180,6 +180,15 @@ public static function getSpecialPages() { '/_quant403', ]; + // Add translations of home page. + if (self::usesLanguagePathPrefixes()) { + if ($prefixes = \Drupal::config('language.negotiation')->get('url.prefixes')) { + foreach ($prefixes as $prefix) { + $pages[] = "/{$prefix}"; + } + } + } + $validator = \Drupal::service('path.validator'); foreach ($pages as $index => $page) { // Remove any pages that don't exist.