2021-01-28 19:17:02 +00:00
|
|
|
import i18n from "i18next";
|
|
|
|
import LanguageDetector from "i18next-browser-languagedetector";
|
|
|
|
import { initReactI18next } from "react-i18next";
|
|
|
|
|
|
|
|
i18n
|
|
|
|
.use(LanguageDetector)
|
|
|
|
.use(initReactI18next)
|
|
|
|
.init({
|
|
|
|
fallbackLng: "en",
|
|
|
|
detection: { order: ["navigator", "cookie", "localStorage", "sessionStorage", "querystring", "htmlTag"] },
|
2021-05-19 05:02:29 +01:00
|
|
|
debug: process.env.NODE_ENV === "development",
|
2021-01-28 19:17:02 +00:00
|
|
|
keySeparator: ".",
|
|
|
|
interpolation: {
|
|
|
|
formatSeparator: ",",
|
|
|
|
},
|
|
|
|
react: {
|
2021-04-06 20:58:49 +01:00
|
|
|
bindI18n: "languageChanged added loaded",
|
2021-01-28 19:17:02 +00:00
|
|
|
bindI18nStore: "added removed",
|
|
|
|
nsMode: "default",
|
|
|
|
useSuspense: false,
|
|
|
|
},
|
|
|
|
});
|
2021-03-30 18:11:43 +01:00
|
|
|
|
|
|
|
export default i18n;
|