File size: 872 Bytes
aeb6dbc 1db7cab 8d8af60 60788d3 aeb6dbc 60788d3 aeb6dbc 8d8af60 1db7cab 60788d3 aeb6dbc 60788d3 aeb6dbc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
import i18n from 'i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import { initReactI18next } from 'react-i18next';
import translation_en from './en';
import translation_es from './es';
import translation_id from './id';
import translation_vi from './vi';
import translation_zh from './zh';
import translation_zh_traditional from './zh-traditional';
const resources = {
en: translation_en,
zh: translation_zh,
'zh-TRADITIONAL': translation_zh_traditional,
id: translation_id,
es: translation_es,
vi: translation_vi,
};
i18n
.use(initReactI18next)
.use(LanguageDetector)
.init({
detection: {
lookupLocalStorage: 'lng',
},
supportedLngs: ['en', 'zh', 'zh-TRADITIONAL', 'id', 'es', 'vi'],
resources,
fallbackLng: 'en',
interpolation: {
escapeValue: false,
},
});
export default i18n;
|