### What problem does this PR solve? Support Traditional Chinese Issue link: #335 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
24 lines
503 B
TypeScript
24 lines
503 B
TypeScript
import i18n from 'i18next';
|
|
import { initReactI18next } from 'react-i18next';
|
|
|
|
import translation_en from './en';
|
|
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,
|
|
};
|
|
|
|
i18n.use(initReactI18next).init({
|
|
resources,
|
|
lng: 'en',
|
|
fallbackLng: 'en',
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
});
|
|
|
|
export default i18n;
|