FitTrackee/fittrackee_client_old/src/i18n.js
2021-11-03 18:26:44 +01:00

24 lines
475 B
JavaScript

import i18n from 'i18next'
import LanguageDetector from 'i18next-browser-languagedetector'
import XHR from 'i18next-xhr-backend'
import { resources } from './locales'
i18n
.use(XHR)
.use(LanguageDetector)
.init({
debug: process.env.NODE_ENV === 'development',
lng: 'en',
fallbackLng: 'en',
keySeparator: false,
interpolation: {
escapeValue: false,
},
resources,
ns: ['common'],
defaultNS: 'common',
})
export default i18n