Files
myeasycms-v2/packages/i18n/src/routing.ts
Giancarlo Buomprisco 7ebff31475 Next.js Supabase V3 (#463)
Version 3 of the kit:
- Radix UI replaced with Base UI (using the Shadcn UI patterns)
- next-intl replaces react-i18next
- enhanceAction deprecated; usage moved to next-safe-action
- main layout now wrapped with [locale] path segment
- Teams only mode
- Layout updates
- Zod v4
- Next.js 16.2
- Typescript 6
- All other dependencies updated
- Removed deprecated Edge CSRF
- Dynamic Github Action runner
2026-03-24 13:40:38 +08:00

24 lines
664 B
TypeScript

import { defineRouting } from 'next-intl/routing';
import { defaultLocale } from './default-locale';
import { locales } from './locales';
// Define the routing configuration for next-intl
export const routing = defineRouting({
// All supported locales
locales,
// Default locale (no prefix in URL)
defaultLocale,
// Default locale has no prefix, other locales do
// Example: /about (en), /es/about (es), /fr/about (fr)
localePrefix: 'as-needed',
// Enable automatic locale detection based on browser headers and cookies
localeDetection: true,
});
// Export locale types for TypeScript
export type Locale = (typeof routing.locales)[number];