FlowWeb / src /i18n.js
danylokhodus's picture
init
de55c35
Raw
History Blame Contribute Delete
512 Bytes
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import enTranslation from './locales/en.json';
import ukTranslation from './locales/uk.json';
const savedLanguage = localStorage.getItem('language') || 'en';
i18n
.use(initReactI18next)
.init({
resources: {
en: { translation: enTranslation },
uk: { translation: ukTranslation }
},
lng: savedLanguage,
fallbackLng: 'en',
interpolation: {
escapeValue: false
}
});
export default i18n;