55 lines
1.9 KiB
JavaScript
55 lines
1.9 KiB
JavaScript
import i18n from 'i18next';
|
|
import { initReactI18next } from "react-i18next";
|
|
|
|
import commonTranslationsEN from './locales/en/common.json'
|
|
import homeTranslationsEN from './locales/en/home.json'
|
|
import peopleTranslationsEN from './locales/en/people.json'
|
|
import authTranslationsEN from './locales/en/auth.json'
|
|
import sessTranslationsEN from './locales/en/sessions.json'
|
|
import unsubscribeTranslationsEN from './locales/en/unsubscribe.json'
|
|
import profileEN from './locales/en/profile.json'
|
|
import accountEN from './locales/en/account.json'
|
|
|
|
import commonTranslationsES from './locales/es/common.json'
|
|
import homeTranslationsES from './locales/es/home.json'
|
|
import peopleTranslationsES from './locales/es/people.json'
|
|
import authTranslationsES from './locales/es/auth.json'
|
|
import sessTranslationsES from './locales/es/sessions.json'
|
|
import unsubscribeTranslationsES from './locales/es/unsubscribe.json'
|
|
import profileES from './locales/es/profile.json'
|
|
import accountES from './locales/es/account.json'
|
|
|
|
i18n.use(initReactI18next).init({
|
|
fallbackLng: 'en',
|
|
lng: 'en',
|
|
resources: {
|
|
en: {
|
|
//translations: require('./locales/en/translations.json')
|
|
common: commonTranslationsEN,
|
|
home: homeTranslationsEN,
|
|
people: peopleTranslationsEN,
|
|
auth: authTranslationsEN,
|
|
sessions: sessTranslationsEN,
|
|
unsubscribe: unsubscribeTranslationsEN,
|
|
profile: profileEN,
|
|
account: accountEN
|
|
},
|
|
es: {
|
|
//translations: require('./locales/es/translations.json')
|
|
common: commonTranslationsES,
|
|
home: homeTranslationsES,
|
|
people: peopleTranslationsES,
|
|
auth: authTranslationsES,
|
|
sessions: sessTranslationsES,
|
|
unsubscribe: unsubscribeTranslationsES,
|
|
profile: profileES,
|
|
account: accountES
|
|
}
|
|
},
|
|
//ns: ['translations'],
|
|
defaultNS: 'common'
|
|
});
|
|
|
|
i18n.languages = ['en', 'es'];
|
|
|
|
export default i18n; |