28 lines
631 B
TypeScript
28 lines
631 B
TypeScript
import i18n from 'i18next';
|
|
import { initReactI18next } from 'react-i18next';
|
|
import kintoneLanguageDetector from '../common/kintoneLanguageDetector';
|
|
|
|
import enTranslation from './locales/en.json';
|
|
import jaTranslation from './locales/ja.json';
|
|
|
|
i18n
|
|
.use(kintoneLanguageDetector)
|
|
.use(initReactI18next)
|
|
.init({
|
|
fallbackLng: 'en',
|
|
// debug: true,
|
|
interpolation: {
|
|
escapeValue: false, // not needed for react as it escapes by default
|
|
},
|
|
resources: {
|
|
en: {
|
|
translation: enTranslation,
|
|
},
|
|
ja: {
|
|
translation: jaTranslation,
|
|
},
|
|
},
|
|
});
|
|
|
|
export default i18n;
|