import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import enTranslations from "../../../util/translations/en-US/renderer.json";

const resources = {
  en: enTranslations,
};

i18n
  .use(initReactI18next)
  .init({
    resources,
    debug: import.meta.env.DEV,
    lng: "en",
    interpolation: {
      escapeValue: false,
    },
  })
  .catch((err) => {
    console.error("i18n initialization error:", err);
    throw err;
  });

export default i18n;
