Skip to content

Commit

Permalink
Fixes |localeUrl not removing current site prefix properly
Browse files Browse the repository at this point in the history
  • Loading branch information
daftspunk committed Feb 16, 2025
1 parent 7c7d4a4 commit 6e490fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion classes/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ public function getPathInLocale($path, $locale = null)
return $path;
}

$newPath = $site->removeRoutePrefix($path);
// Remove old prefix (current site)
$newPath = Site::getSiteFromContext()->removeRoutePrefix($path);

// Attach new prefix (proposed site)
$newPath = $site->attachRoutePrefix($newPath);

return $newPath;
Expand Down

0 comments on commit 6e490fe

Please sign in to comment.