Fix dynamic default locale routing

This commit is contained in:
MOH
2026-03-15 04:41:08 +01:00
parent 50c3f5cce9
commit 364f761420
13 changed files with 73 additions and 32 deletions
+6 -2
View File
@@ -28,8 +28,12 @@ export function stripLocalePrefix(pathname: string): string {
return pathname || "/";
}
export function getLocalizedPath(locale: string, pathname = "/"): string {
return getLocalizedPathWithDefault(locale, pathname, routing.defaultLocale);
export function getLocalizedPath(
locale: string,
pathname = "/",
defaultLocale: AppLocale = routing.defaultLocale,
): string {
return getLocalizedPathWithDefault(locale, pathname, defaultLocale);
}
export function getLocalizedPathWithDefault(