Skip to content

Commit

Permalink
Merge pull request #229 from quantcdn/feature/multilingual-home-paths
Browse files Browse the repository at this point in the history
Added home page path prefixes.
  • Loading branch information
kepol authored Jan 29, 2025
2 parents 89d1088 + eb751c8 commit 1ed63ec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,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.
Expand Down

0 comments on commit 1ed63ec

Please sign in to comment.