You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mvfront-react/functions/i18next.ts

32 lines
802 B

import {InitOptions} from "i18next";
// import all namespaces (for the default language, only)
import emailEn from "../public/locales/en/email.json";
import emailFr from "../public/locales/fr/email.json";
import resourceEn from "../public/locales/en/resource.json";
import resourceFr from "../public/locales/fr/resource.json";
export const defaultNS = "email";
export const resources = {
en: {
email: emailEn,
resource: resourceEn,
},
fr: {
email: emailFr,
resource: resourceFr,
},
} as const;
export const availableLanguages = Object.keys(resources);
export const i18n: InitOptions = {
// https://www.i18next.com/overview/configuration-options#logging
debug: process.env.NODE_ENV === 'development',
ns: ["resource", "email"],
resources,
defaultNS: defaultNS,
}