frontend/i18n.ts (view raw)
1import i18n from 'i18next';
2import {initReactI18next} from 'react-i18next';
3import translationFr from './locales/fr.json';
4
5const resources = {
6 fr: {
7 translation: translationFr,
8 },
9};
10
11i18n
12 .use(initReactI18next) // passes i18n down to react-i18next
13 .init({
14 resources,
15 lng: 'fr',
16 interpolation: {
17 escapeValue: false, // react already safes from xss
18 },
19 });
20
21export default i18n;