keycloak-scim/src/i18n.ts

40 lines
830 B
TypeScript
Raw Normal View History

import i18n from "i18next";
import { initReactI18next } from "react-i18next";
// import backend from "i18next-http-backend";
import common from "./common-messages.json";
import clients from "./clients/messages.json";
import clientScopes from "./client-scopes/messages.json";
import groups from "./groups/messages.json";
import realm from "./realm/messages.json";
import roles from "./realm-roles/messages.json";
2020-09-08 17:12:42 +00:00
import help from "./help.json";
const initOptions = {
defaultNS: "common",
resources: {
en: {
...common,
...help,
...clients,
...clientScopes,
...groups,
...realm,
...roles,
},
},
lng: "en",
fallbackLng: "en",
interpolation: {
escapeValue: false,
},
};
i18n
.use(initReactI18next)
// .use(backend)
.init(initOptions);
export default i18n;