2022-04-05 14:25:53 +00:00
|
|
|
import i18n from "i18next";
|
|
|
|
import LanguageDetector from "i18next-browser-languagedetector";
|
|
|
|
import { initReactI18next } from "react-i18next";
|
|
|
|
import HttpApi from 'i18next-http-backend';
|
|
|
|
|
|
|
|
import translationEN from "../locales/en.json";
|
|
|
|
import translationES from "../locales/es.json";
|
|
|
|
import translationDE from "../locales/de.json";
|
2022-05-24 22:49:50 +00:00
|
|
|
import translationRU from "../locales/ru.json";
|
2022-05-01 13:41:55 +00:00
|
|
|
// import translationZH from "../locales/zh.json";
|
2022-04-24 19:32:08 +00:00
|
|
|
import translationPL from "../locales/pl.json";
|
2022-04-29 19:26:33 +00:00
|
|
|
import translationFR from "../locales/fr.json";
|
2022-05-11 13:31:12 +00:00
|
|
|
import translationCA from "../locales/ca.json";
|
2022-06-17 17:37:19 +00:00
|
|
|
import translationIT from "../locales/it.json";
|
2022-04-05 14:25:53 +00:00
|
|
|
|
|
|
|
i18n
|
|
|
|
.use(HttpApi)
|
|
|
|
.use(LanguageDetector)
|
|
|
|
.use(initReactI18next)
|
|
|
|
.init({
|
|
|
|
resources: {
|
|
|
|
en: {translations: translationEN},
|
|
|
|
es: {translations: translationES},
|
2022-05-24 22:49:50 +00:00
|
|
|
ru: {translations: translationRU},
|
2022-04-05 14:25:53 +00:00
|
|
|
de: {translations: translationDE},
|
2022-05-01 13:41:55 +00:00
|
|
|
// zh: {translations: translationZH},
|
2022-04-24 19:32:08 +00:00
|
|
|
pl: {translations: translationPL},
|
2022-04-29 19:26:33 +00:00
|
|
|
fr: {translations: translationFR},
|
2022-05-11 13:31:12 +00:00
|
|
|
ca: {translations: translationCA},
|
2022-06-17 17:37:19 +00:00
|
|
|
it: {translations: translationIT},
|
2022-04-05 14:25:53 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
fallbackLng: "en",
|
2022-04-17 19:14:22 +00:00
|
|
|
debug: false,
|
2022-04-05 14:25:53 +00:00
|
|
|
|
|
|
|
// have a common namespace used around the full app
|
|
|
|
ns: ["translations"],
|
|
|
|
defaultNS: "translations",
|
|
|
|
|
|
|
|
keySeparator: false, // we use content as keys
|
|
|
|
|
|
|
|
interpolation: {
|
|
|
|
escapeValue: false,
|
|
|
|
formatSeparator: ","
|
|
|
|
},
|
2022-04-10 15:11:11 +00:00
|
|
|
|
2022-04-05 14:25:53 +00:00
|
|
|
react: {
|
|
|
|
wait: true,
|
|
|
|
useSuspense: false,
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default i18n;
|