2024-06-19 23:48:19 +02:00
|
|
|
import i18next from "i18next";
|
|
|
|
import { initReactI18next } from "react-i18next";
|
|
|
|
import LanguageDetector from "i18next-browser-languagedetector";
|
|
|
|
import { defaultNS, resources } from "./locales/resources";
|
|
|
|
|
|
|
|
i18next
|
|
|
|
// https://github.com/i18next/i18next-browser-languageDetector/blob/9efebe6ca0271c3797bc09b84babf1ba2d9b4dbb/src/index.js#L11
|
|
|
|
.use(initReactI18next) // Initialize i18n for React
|
|
|
|
.use(LanguageDetector)
|
|
|
|
.init({
|
|
|
|
fallbackLng: "en",
|
2024-06-21 00:36:39 +02:00
|
|
|
debug: import.meta.env.DEV,
|
2024-06-19 23:48:19 +02:00
|
|
|
defaultNS,
|
|
|
|
resources,
|
|
|
|
lowerCaseLng: true,
|
|
|
|
interpolation: {
|
|
|
|
escapeValue: false,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default i18next;
|