UNPKG

next-i18n-router

Version:

Next.js App Router internationalized routing and locale detection.

14 lines (13 loc) 489 B
import { NextRequest } from 'next/server'; import { ResponseCookie } from 'next/dist/compiled/@edge-runtime/cookies'; export interface Config { locales: readonly string[]; defaultLocale: string; localeCookie?: string; localeDetector?: ((request: NextRequest, config: Config) => string) | false; prefixDefault?: boolean; noPrefix?: boolean; basePath?: string; serverSetCookie?: 'if-empty' | 'always' | 'never'; cookieOptions?: Partial<ResponseCookie>; }