18 lines
445 B
TypeScript
18 lines
445 B
TypeScript
import { defineRouting } from "next-intl/routing";
|
|
|
|
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();
|