schon/storefront/i18n/i18.config.ts
2026-02-27 21:59:51 +03:00

18 lines
472 B
TypeScript

import type { NuxtI18nOptions } from '@nuxtjs/i18n';
import { DEFAULT_LOCALE, SUPPORTED_LOCALES } from '../app/constants';
export const i18nConfig: NuxtI18nOptions = {
defaultLocale: DEFAULT_LOCALE,
locales: SUPPORTED_LOCALES.map((locale) => ({
code: locale.code,
file: locale.file,
})),
lazy: true,
strategy: 'prefix',
detectBrowserLanguage: {
alwaysRedirect: true,
redirectOn: 'root',
fallbackLocale: DEFAULT_LOCALE,
cookieKey: 'schon-locale',
},
};