mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-15 10:50:31 +01:00
22 lines
611 B
JavaScript
22 lines
611 B
JavaScript
|
import i18next from "i18next";
|
||
|
import { initReactI18next } from "react-i18next";
|
||
|
import LanguageDetector from "i18next-browser-languagedetector";
|
||
|
import { defaultNS, resources } from "./locales/resources";
|
||
|
|
||
|
i18next
|
||
|
// https://github.com/i18next/i18next-browser-languageDetector/blob/9efebe6ca0271c3797bc09b84babf1ba2d9b4dbb/src/index.js#L11
|
||
|
.use(initReactI18next) // Initialize i18n for React
|
||
|
.use(LanguageDetector)
|
||
|
.init({
|
||
|
fallbackLng: "en",
|
||
|
debug: true,
|
||
|
defaultNS,
|
||
|
resources,
|
||
|
lowerCaseLng: true,
|
||
|
interpolation: {
|
||
|
escapeValue: false,
|
||
|
},
|
||
|
});
|
||
|
|
||
|
export default i18next;
|