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-09-16 10:26:02 +02:00
|
|
|
import EnActivitiesTranslations from './locales/en/activities.json'
|
2019-09-08 11:35:30 +02:00
|
|
|
import EnCommonTranslations from './locales/en/common.json'
|
2019-09-16 10:26:02 +02:00
|
|
|
import EnDashboardTranslations from './locales/en/dashboard.json'
|
2019-09-16 17:54:21 +02:00
|
|
|
import EnMessagesTranslations from './locales/en/messages.json'
|
2019-09-16 10:26:02 +02:00
|
|
|
import EnSportsTranslations from './locales/en/sports.json'
|
|
|
|
import EnStatisticsTranslations from './locales/en/statistics.json'
|
2019-09-08 11:35:30 +02:00
|
|
|
import EnUserTranslations from './locales/en/user.json'
|
2019-09-16 10:26:02 +02:00
|
|
|
import FrActivitiesTranslations from './locales/fr/activities.json'
|
2019-09-08 11:35:30 +02:00
|
|
|
import FrCommonTranslations from './locales/fr/common.json'
|
2019-09-16 10:26:02 +02:00
|
|
|
import FrDashboardTranslations from './locales/fr/dashboard.json'
|
2019-09-16 17:54:21 +02:00
|
|
|
import FrMessagesTranslations from './locales/fr/messages.json'
|
2019-09-16 10:26:02 +02:00
|
|
|
import FrSportsTranslations from './locales/fr/sports.json'
|
|
|
|
import FrStatisticsTranslations from './locales/fr/statistics.json'
|
2019-09-08 11:35:30 +02:00
|
|
|
import FrUserTranslations from './locales/fr/user.json'
|
2019-09-08 11:17:02 +02:00
|
|
|
|
|
|
|
i18n
|
|
|
|
.use(XHR)
|
|
|
|
.use(LanguageDetector)
|
|
|
|
.init({
|
|
|
|
debug: true,
|
|
|
|
lng: 'en',
|
|
|
|
fallbackLng: 'en',
|
|
|
|
keySeparator: false,
|
|
|
|
interpolation: {
|
|
|
|
escapeValue: false,
|
|
|
|
},
|
|
|
|
resources: {
|
|
|
|
en: {
|
2019-09-16 10:26:02 +02:00
|
|
|
activities: EnActivitiesTranslations,
|
2019-09-08 11:35:30 +02:00
|
|
|
common: EnCommonTranslations,
|
2019-09-16 10:26:02 +02:00
|
|
|
dashboard: EnDashboardTranslations,
|
2019-09-16 17:54:21 +02:00
|
|
|
messages: EnMessagesTranslations,
|
2019-09-16 10:26:02 +02:00
|
|
|
sports: EnSportsTranslations,
|
|
|
|
statistics: EnStatisticsTranslations,
|
2019-09-08 11:35:30 +02:00
|
|
|
user: EnUserTranslations,
|
2019-09-08 11:17:02 +02:00
|
|
|
},
|
|
|
|
fr: {
|
2019-09-16 10:26:02 +02:00
|
|
|
activities: FrActivitiesTranslations,
|
2019-09-08 11:35:30 +02:00
|
|
|
common: FrCommonTranslations,
|
2019-09-16 10:26:02 +02:00
|
|
|
dashboard: FrDashboardTranslations,
|
2019-09-16 17:54:21 +02:00
|
|
|
messages: FrMessagesTranslations,
|
2019-09-16 10:26:02 +02:00
|
|
|
sports: FrSportsTranslations,
|
|
|
|
statistics: FrStatisticsTranslations,
|
2019-09-08 11:35:30 +02:00
|
|
|
user: FrUserTranslations,
|
2019-09-08 11:17:02 +02:00
|
|
|
},
|
|
|
|
},
|
2019-09-08 11:35:30 +02:00
|
|
|
ns: ['common'],
|
|
|
|
defaultNS: 'common',
|
2019-09-08 11:17:02 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
export default i18n
|