anything-llm/frontend/src/i18n.js
Timothy Carambat 1d675d09fb
RU Transaltions (#1734)
* ru language added

* uncheck bad changes
Use chatGPT to create new dictionary for RU translation
turn off debug mode in produ for i18n
patch issue with null comparison in verifyTranslation.js

---------

Co-authored-by: UUSR <konstantik@gmail.com>
2024-06-20 15:36:39 -07:00

22 lines
626 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: import.meta.env.DEV,
defaultNS,
resources,
lowerCaseLng: true,
interpolation: {
escapeValue: false,
},
});
export default i18next;