import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import authEn from "../../main/src/locales/en/auth.json";
import chatEn from "../../main/src/locales/en/chat.json";
import commonEn from "../../main/src/locales/en/common.json";
import componentsEn from "../../main/src/locales/en/components.json";
import pagesEn from "../../main/src/locales/en/pages.json";
import tabloEn from "../../main/src/locales/en/tablo.json";
import authFr from "../../main/src/locales/fr/auth.json";
import chatFr from "../../main/src/locales/fr/chat.json";
import commonFr from "../../main/src/locales/fr/common.json";
import componentsFr from "../../main/src/locales/fr/components.json";
import pagesFr from "../../main/src/locales/fr/pages.json";
import tabloFr from "../../main/src/locales/fr/tablo.json";
import bookingEn from "./locales/en/booking.json";
import bookingFr from "./locales/fr/booking.json";

i18n.use(initReactI18next).init({
  resources: {
    fr: {
      auth: authFr,
      booking: bookingFr,
      chat: chatFr,
      common: commonFr,
      components: componentsFr,
      pages: pagesFr,
      tablo: tabloFr,
    },
    en: {
      auth: authEn,
      booking: bookingEn,
      chat: chatEn,
      common: commonEn,
      components: componentsEn,
      pages: pagesEn,
      tablo: tabloEn,
    },
  },
  lng: "fr",
  fallbackLng: "fr",
  defaultNS: "booking",
  interpolation: {
    escapeValue: false,
  },
});

export default i18n;
