import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import { zh_Hans } from './zh_Hans';
import { zh_Hant } from './zh_Hant';


i18n
    // pass the i18n instance to react-i18next.
    .use(initReactI18next)
    // init i18next
    // for all options read: https://www.i18next.com/overview/configuration-options
    .init({
        fallbackLng: 'zh_Hans',
        lng:'zh_Hans',
        ns: ['common'],
        defaultNS: 'common',
        interpolation: {
            escapeValue: false, // not needed for react as it escapes by default
        },
        resources: {
            zh_Hans,
            zh_Hant
        },
    });

export default i18n;