Unify dynamic locale routing
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-15 05:12:33 +01:00
parent dfed5ec831
commit 27df4ad2fe
3 changed files with 42 additions and 46 deletions
+15 -7
View File
@@ -1,9 +1,17 @@
import { defineRouting } from "next-intl/routing";
export const routing = defineRouting({
locales: ["de", "en", "ar"],
defaultLocale: "de",
localePrefix: "as-needed",
localeCookie: false,
localeDetection: false,
});
export const appLocales = ["de", "en", "ar"] as const;
export type RoutingLocale = (typeof appLocales)[number];
export function createI18nRouting(defaultLocale: RoutingLocale = "de") {
return defineRouting({
locales: appLocales,
defaultLocale,
localePrefix: "as-needed",
localeCookie: false,
localeDetection: false,
});
}
export const routing = createI18nRouting();