import i18n from "i18next"; import { initReactI18next } from "react-i18next"; import translation_en from "./en.json"; import translation_ja from "./ja.json"; import translation_ko from "./ko.json"; import translation_zh_Hant from "./zh-Hant.json"; import translation_zh_Hans from "./zh-Hans.json"; const resources = { en: { translation: translation_en }, ja: { translation: translation_ja }, ko: { translation: translation_ko }, "zh-Hant": { translation: translation_zh_Hant }, "zh-Hans": { translation: translation_zh_Hans }, }; i18n .use(initReactI18next) // passes i18n down to react-i18next .init({ resources, lng: "en", fallbackLng: "en", debug: true, interpolation: { escapeValue: false // react already safes from xss }, // react: { useSuspense: false }, }); export default i18n;