20 lines
427 B
TypeScript
20 lines
427 B
TypeScript
import i18n from "i18next";
|
|
import detector from "i18next-browser-languagedetector";
|
|
import Backend from "i18next-xhr-backend";
|
|
import { initReactI18next } from "react-i18next";
|
|
|
|
i18n
|
|
.use(Backend)
|
|
.use(detector)
|
|
.use(initReactI18next)
|
|
.init({
|
|
supportedLngs: ["en"],
|
|
backend: {
|
|
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
|
},
|
|
defaultNS: "common",
|
|
fallbackLng: ["en"],
|
|
});
|
|
|
|
export default i18n;
|