Files
Krow-workspace/apps/web/src/i18n/index.ts
2026-02-09 12:24:28 +05:30

16 lines
494 B
TypeScript

import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import LanguageDetector from "i18next-browser-languagedetector";
import Backend from "i18next-http-backend";
i18n
.use(LanguageDetector) // detects browser language
.use(initReactI18next)// passes i18n down to react-i18next
.use(Backend) // loads translations asynchoronusly from /locales/{{lng}}/{{ns}}.json
.init({
fallbackLng: "en", // fallback language
debug: true,
});
export default i18n;