zkt26/sk1/Front-end/src/i18n.js
2026-05-12 19:27:18 +02:00

25 lines
523 B
JavaScript

import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import frTranslation from './locales/fr.json';
import enTranslation from './locales/en.json';
const resources = {
fr: { translation: frTranslation },
en: { translation: enTranslation }
};
i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
resources,
fallbackLng: 'fr',
interpolation: {
escapeValue: false
}
});
export default i18n;