import i18next from "i18next";
import { initReactI18next } from "react-i18next";
import LanguageDetector from "i18next-browser-languagedetector";
const i18nLDConfig = {
order: ['localStorage', 'navigator'],
lookupLocalStorage: language,
nonExplicitSupportedLngs: false,
cleanCode: true,
caches: ['localStorage'],
excludeCacheFor: ['cimode'],
};
export const configureI18next = () => {
i18next
.use(LanguageDetector)
.use(initReactI18next)
.init({
...i18LDConfig,
fallbackLng: "en-GB",
interpolation: {
escapeValue: false,
},
});
};