all repos — caroster @ 5fa52dfbd467d93ed40542222227bea53bc4dee0

[Octree] Group carpool to your event https://caroster.io

frontend/i18n.ts (view raw)

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