web-apps/apps/documenteditor/mobile/src/lib/i18n.js

20 lines
500 B
JavaScript
Raw Normal View History

2020-08-13 10:35:58 +00:00
import i18n from 'i18next'
import {initReactI18next} from 'react-i18next'
import Fetch from 'i18next-fetch-backend'
i18n.use(initReactI18next)
.use(Fetch)
.init({
lng: Common.Locale.currentLang,
2021-10-22 20:04:06 +00:00
fallbackLng: Common.Locale.defaultLang,
2020-08-13 10:35:58 +00:00
escapeValue: false,
backend: {
loadPath: './locale/{{lng}}.json'
},
interpolation: { escapeValue: false },
2021-09-12 21:51:01 +00:00
react: {
useSuspense: false,
},
2020-08-13 10:35:58 +00:00
});
export default i18n;