2020-09-01 14:51:59 +00:00
|
|
|
import i18n from "i18next";
|
|
|
|
import { initReactI18next } from "react-i18next";
|
2020-08-04 12:59:41 +00:00
|
|
|
// import backend from "i18next-http-backend";
|
|
|
|
|
2020-09-10 18:04:03 +00:00
|
|
|
import common from "./common-messages.json";
|
|
|
|
import clients from "./clients/messages.json";
|
|
|
|
import realm from "./realm/messages.json";
|
2020-09-08 17:12:42 +00:00
|
|
|
import help from "./help.json";
|
2020-08-04 12:59:41 +00:00
|
|
|
|
|
|
|
const initOptions = {
|
2020-09-10 18:04:03 +00:00
|
|
|
ns: ["common", "help", "clients", "realm"],
|
|
|
|
defaultNS: "common",
|
|
|
|
resources: {
|
|
|
|
en: { ...common, ...help, ...clients, ...realm },
|
|
|
|
},
|
2020-09-01 14:51:59 +00:00
|
|
|
lng: "en",
|
|
|
|
fallbackLng: "en",
|
2020-08-04 12:59:41 +00:00
|
|
|
|
|
|
|
interpolation: {
|
|
|
|
escapeValue: false,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
i18n
|
|
|
|
.use(initReactI18next)
|
|
|
|
// .use(backend)
|
|
|
|
.init(initOptions);
|
|
|
|
|
2020-09-10 18:04:03 +00:00
|
|
|
export default i18n;
|