simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 1 | import i18n from 'i18next'; |
| 2 | import { initReactI18next } from 'react-i18next'; |
simon | 07b4eb0 | 2022-09-29 17:50:26 -0400 | [diff] [blame] | 3 | |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 4 | import translationEn from '../public/locale/en/translation.json'; |
| 5 | import translationFr from '../public/locale/fr/translation.json'; |
idillon | 5815c73 | 2022-09-16 13:54:45 -0400 | [diff] [blame] | 6 | |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 7 | i18n.use(initReactI18next).init({ |
| 8 | debug: process.env.NODE_ENV == 'development', |
| 9 | lng: 'en', |
idillon | 5815c73 | 2022-09-16 13:54:45 -0400 | [diff] [blame] | 10 | interpolation: { |
| 11 | escapeValue: false, |
| 12 | }, |
| 13 | resources: { |
| 14 | en: { |
| 15 | translation: translationEn, |
| 16 | }, |
| 17 | fr: { |
| 18 | translation: translationFr, |
| 19 | }, |
| 20 | }, |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 21 | }); |
idillon | 5815c73 | 2022-09-16 13:54:45 -0400 | [diff] [blame] | 22 | |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 23 | export default i18n; |