UNPKG

minikit-limpo-template

Version:

A minimal Next.js app starter template with WorldCoin MiniKit authentication integration

40 lines (33 loc) 854 B
"use client"; import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; import LanguageDetector from 'i18next-browser-languagedetector'; // Import translation files import enCommon from './locales/en/common.json'; import esCommon from './locales/es/common.json'; import ptCommon from './locales/pt/common.json'; // Initialize i18next i18n .use(LanguageDetector) .use(initReactI18next) .init({ resources: { en: { common: enCommon, }, es: { common: esCommon, }, pt: { common: ptCommon, }, }, fallbackLng: 'en', debug: process.env.NODE_ENV === 'development', // Common namespace used around the app defaultNS: 'common', interpolation: { escapeValue: false, // React already escapes values }, }); export default i18n;