1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-09 00:35:00 +00:00
mon-entreprise/source/i18n.ts
Maxime Quandalle bbe7933586 🧰 Ne plus charger les traductions anglaises sur mon-entreprise.fr
Délègue entièrement la gestion de l'état du langage à i18next.
2020-04-27 12:44:50 +02:00

17 lines
402 B
TypeScript

import i18next from 'i18next'
import { initReactI18next } from 'react-i18next'
import unitsTranslations from './locales/units.yaml'
export type AvailableLangs = 'fr' | 'en'
i18next
.use(initReactI18next)
.init({
resources: {
fr: { units: unitsTranslations.fr },
en: { units: unitsTranslations.en }
}
})
.catch(err => console?.error('Error from i18n load', err))
export default i18next