20 lines
459 B
TypeScript
20 lines
459 B
TypeScript
import i18next from "i18next";
|
|
import { initReactI18next } from "react-i18next";
|
|
import LanguageDetector from "i18next-browser-languagedetector";
|
|
import HttpBackend from "i18next-http-backend";
|
|
|
|
i18next
|
|
.use(HttpBackend)
|
|
.use(LanguageDetector)
|
|
.use(initReactI18next)
|
|
.init({
|
|
fallbackLng: "en",
|
|
debug: false,
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
backend: {
|
|
loadPath: "/locales/{{lng}}/translation.json",
|
|
},
|
|
});
|