import i18n from "i18next";
import { initReactI18next } from "react-i18next";

import csCommon from "./locales/cs/common.json";
import csSocial from "./locales/cs/social.json";
import csAuth from "./locales/cs/auth.json";
import csHome from "./locales/cs/home.json";
import csServices from "./locales/cs/services.json";
import csContact from "./locales/cs/contact.json";
import csDownloader from "./locales/cs/downloader.json";

void i18n.use(initReactI18next).init({
  resources: {
    cs: {
      common: csCommon,
      social: csSocial,
      auth: csAuth,
      home: csHome,
      services: csServices,
      contact: csContact,
      downloader: csDownloader,
    },
  },
  lng: "cs",
  fallbackLng: "cs",
  defaultNS: "common",
  ns: ["common", "social", "auth", "home", "services", "contact", "downloader"],
  interpolation: { escapeValue: false },
  returnNull: false,
});

export default i18n;
