You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
554 B

import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import * as en from './translations/en.json';
import * as zh from './translations/zh.json';
i18n
.use(initReactI18next) // passes i18n down to react-i18next
.init({
fallbackLng: 'en',
resources: {
en,
zh,
'en-US': en,
'zh-CN': zh,
},
lng: 'en',
keySeparator: false, // we do not use keys in form messages.welcome
interpolation: {
escapeValue: false, // react already safes from xss
},
});
export default i18n;