Files
lettersoup-online/002_source/cms/src/lib/i18n.ts
louiscklaw 6c931c1fe8 build ok,
2025-04-14 09:26:24 +08:00

13 lines
391 B
TypeScript

import { use } from 'i18next';
import Backend from 'i18next-http-backend';
import { initReactI18next } from 'react-i18next';
import { logger } from '@/lib/default-logger';
export const i18n = use(Backend)
.use(initReactI18next)
.init({ lng: 'en', fallbackLng: 'en', interpolation: { escapeValue: false } })
.catch((err) => {
logger.error('Failed to initialize i18n', err);
});