2018-03-29 14:47:52 +02:00
|
|
|
import i18next from 'i18next'
|
2019-10-12 20:23:54 +02:00
|
|
|
import unitsTranslations from './locales/units.yaml'
|
2020-05-08 12:04:00 +02:00
|
|
|
import { initReactI18next } from 'react-i18next'
|
2019-11-10 16:57:44 +01:00
|
|
|
|
2019-10-12 18:45:55 +02:00
|
|
|
i18next
|
|
|
|
.use(initReactI18next)
|
2020-05-08 12:04:00 +02:00
|
|
|
|
2019-10-12 18:45:55 +02:00
|
|
|
.init({
|
2018-03-29 14:47:52 +02:00
|
|
|
resources: {
|
2019-10-12 20:23:54 +02:00
|
|
|
fr: { units: unitsTranslations.fr },
|
2020-12-01 10:17:27 +01:00
|
|
|
en: { units: unitsTranslations.en },
|
|
|
|
},
|
2019-10-12 18:45:55 +02:00
|
|
|
})
|
2020-12-01 10:17:27 +01:00
|
|
|
.catch((err) => console?.error('Error from i18n load', err))
|
2018-03-29 14:47:52 +02:00
|
|
|
|
2018-11-09 12:36:29 +01:00
|
|
|
export default i18next
|