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";
|
2020-10-09 06:48:50 +00:00
|
|
|
import help from "./common-help.json";
|
2020-09-10 18:04:03 +00:00
|
|
|
import clients from "./clients/messages.json";
|
2020-10-09 06:48:50 +00:00
|
|
|
import clientsHelp from "./clients/help.json";
|
2020-09-25 17:11:25 +00:00
|
|
|
import clientScopes from "./client-scopes/messages.json";
|
2020-10-09 06:48:50 +00:00
|
|
|
import clientScopesHelp from "./client-scopes/help.json";
|
2020-09-28 15:58:03 +00:00
|
|
|
import groups from "./groups/messages.json";
|
2020-09-10 18:04:03 +00:00
|
|
|
import realm from "./realm/messages.json";
|
2020-09-18 08:04:55 +00:00
|
|
|
import roles from "./realm-roles/messages.json";
|
2020-10-01 14:25:29 +00:00
|
|
|
import users from "./user/messages.json";
|
|
|
|
import sessions from "./sessions/messages.json";
|
|
|
|
import events from "./events/messages.json";
|
2020-10-09 06:48:50 +00:00
|
|
|
import storybook from "./stories/messages.json";
|
2020-10-15 05:50:47 +00:00
|
|
|
import userFederation from "./user-federation/messages.json";
|
2020-10-30 20:15:37 +00:00
|
|
|
import userFederationHelp from "./user-federation/help.json";
|
2020-08-04 12:59:41 +00:00
|
|
|
|
|
|
|
const initOptions = {
|
2020-09-10 18:04:03 +00:00
|
|
|
defaultNS: "common",
|
|
|
|
resources: {
|
2020-09-28 15:58:03 +00:00
|
|
|
en: {
|
|
|
|
...common,
|
|
|
|
...help,
|
|
|
|
...clients,
|
2020-10-09 06:48:50 +00:00
|
|
|
...clientsHelp,
|
2020-09-28 15:58:03 +00:00
|
|
|
...clientScopes,
|
2020-10-09 06:48:50 +00:00
|
|
|
...clientScopesHelp,
|
2020-09-28 15:58:03 +00:00
|
|
|
...groups,
|
|
|
|
...realm,
|
|
|
|
...roles,
|
2020-10-01 14:25:29 +00:00
|
|
|
...groups,
|
|
|
|
...users,
|
|
|
|
...sessions,
|
|
|
|
...events,
|
2020-10-09 06:48:50 +00:00
|
|
|
...storybook,
|
2020-10-15 05:50:47 +00:00
|
|
|
...userFederation,
|
2020-10-30 20:15:37 +00:00
|
|
|
...userFederationHelp,
|
2020-09-28 15:58:03 +00:00
|
|
|
},
|
2020-09-10 18:04:03 +00:00
|
|
|
},
|
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;
|