2019-09-08 11:17:02 +02:00
|
|
|
import i18n from 'i18next'
|
|
|
|
import LanguageDetector from 'i18next-browser-languagedetector'
|
|
|
|
import XHR from 'i18next-xhr-backend'
|
|
|
|
|
2019-12-29 11:37:17 +01:00
|
|
|
import { resources } from './locales'
|
2019-09-08 11:17:02 +02:00
|
|
|
|
|
|
|
i18n
|
|
|
|
.use(XHR)
|
|
|
|
.use(LanguageDetector)
|
|
|
|
.init({
|
2019-12-28 22:46:02 +01:00
|
|
|
debug: process.env.NODE_ENV === 'development',
|
2019-09-08 11:17:02 +02:00
|
|
|
lng: 'en',
|
|
|
|
fallbackLng: 'en',
|
|
|
|
keySeparator: false,
|
|
|
|
interpolation: {
|
|
|
|
escapeValue: false,
|
|
|
|
},
|
2019-12-29 11:37:17 +01:00
|
|
|
resources,
|
2019-09-08 11:35:30 +02:00
|
|
|
ns: ['common'],
|
|
|
|
defaultNS: 'common',
|
2019-09-08 11:17:02 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
export default i18n
|