i18n.ts 341 B

1234567891011121314151617
  1. import i18n from "i18next";
  2. import { initReactI18next } from "react-i18next";
  3. import en from "@/locales/en.json";
  4. import zh from "@/locales/zh.json";
  5. const resources = {
  6. en: { translation: en },
  7. zh: { translation: zh },
  8. };
  9. i18n.use(initReactI18next).init({
  10. resources,
  11. lng: "en",
  12. interpolation: {
  13. escapeValue: false,
  14. },
  15. });