support language translation.

This commit is contained in:
2025-07-04 15:32:01 +09:00
parent 83f29b8e63
commit be0daf2097
14 changed files with 329 additions and 100 deletions

27
src/config/i18n.ts Normal file
View File

@@ -0,0 +1,27 @@
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;