+15
-7
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user