import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import idCommon from '../public/locales/id/common.json';
import enGBCommon from '../public/locales/en-GB/common.json';

i18n
    .use(initReactI18next)
    .init({
        lng: 'id',
        fallbackLng: 'id',
        supportedLngs: ['id', 'en-GB'],
        resources: {
            id: {
                common: idCommon,
            },
            'en-GB': {
                common: enGBCommon,
            },
        },
        defaultNS: 'common',
        ns: ['common'],
        interpolation: { escapeValue: false },
    });

export default i18n;
