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";
|
|
|
|
|
2021-07-14 10:15:48 +00:00
|
|
|
import common from "./common-messages";
|
|
|
|
import help from "./common-help";
|
|
|
|
import dashboard from "./dashboard/messages";
|
|
|
|
import clients from "./clients/messages";
|
|
|
|
import clientsHelp from "./clients/help";
|
|
|
|
import clientScopes from "./client-scopes/messages";
|
|
|
|
import clientScopesHelp from "./client-scopes/help";
|
|
|
|
import groups from "./groups/messages";
|
|
|
|
import realm from "./realm/messages";
|
|
|
|
import roles from "./realm-roles/messages";
|
|
|
|
import users from "./user/messages";
|
|
|
|
import usersHelp from "./user/help";
|
|
|
|
import sessions from "./sessions/messages";
|
|
|
|
import events from "./events/messages";
|
|
|
|
import realmSettings from "./realm-settings/messages";
|
|
|
|
import realmSettingsHelp from "./realm-settings/help";
|
|
|
|
import authentication from "./authentication/messages";
|
2021-08-09 08:47:34 +00:00
|
|
|
import authenticationHelp from "./authentication/help";
|
2021-07-14 10:15:48 +00:00
|
|
|
import userFederation from "./user-federation/messages";
|
|
|
|
import userFederationHelp from "./user-federation/help";
|
|
|
|
import identityProviders from "./identity-providers/messages";
|
|
|
|
import identityProvidersHelp from "./identity-providers/help";
|
2020-08-04 12:59:41 +00:00
|
|
|
|
2021-08-19 13:56:00 +00:00
|
|
|
export const DEFAULT_LOCALE = "en";
|
|
|
|
|
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,
|
2021-01-15 01:44:16 +00:00
|
|
|
...dashboard,
|
2020-09-28 15:58:03 +00:00
|
|
|
...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,
|
2021-06-16 11:35:03 +00:00
|
|
|
...usersHelp,
|
2020-10-01 14:25:29 +00:00
|
|
|
...sessions,
|
2020-11-10 20:26:20 +00:00
|
|
|
...userFederation,
|
2020-10-01 14:25:29 +00:00
|
|
|
...events,
|
2021-01-13 19:59:45 +00:00
|
|
|
...realmSettings,
|
|
|
|
...realmSettingsHelp,
|
2021-01-26 19:39:01 +00:00
|
|
|
...authentication,
|
2021-08-09 08:47:34 +00:00
|
|
|
...authenticationHelp,
|
2021-04-21 13:18:45 +00:00
|
|
|
...identityProviders,
|
|
|
|
...identityProvidersHelp,
|
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
|
|
|
},
|
2021-08-19 13:56:00 +00:00
|
|
|
lng: DEFAULT_LOCALE,
|
|
|
|
fallbackLng: DEFAULT_LOCALE,
|
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;
|