reimplement the editor use lastest antd and other libs, feature of this commit:
1. file manger 2. highlight for click input or output 3. selector of subtress 4. autocomplete for input or output
This commit is contained in:
1 parent
91da6f0071
commit
2e5c08b2ad
84 files changed
+14250
-11038
No files matched your search
@@ -0,0 +1,45 @@
|
||||
import dayjs from "dayjs";
|
||||
import i18n from "i18next";
|
||||
import LanguageDetector from "i18next-browser-languagedetector";
|
||||
import HttpApi from "i18next-http-backend";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
|
||||
declare module "i18next" {
|
||||
interface CustomTypeOptions {
|
||||
returnNull: false;
|
||||
}
|
||||
}
|
||||
|
||||
i18n
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.use(HttpApi)
|
||||
.init(
|
||||
{
|
||||
debug: import.meta.env.NODE_ENV === "development",
|
||||
returnNull: false,
|
||||
fallbackLng: "en",
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
react: {
|
||||
useSuspense: false,
|
||||
},
|
||||
load: "languageOnly",
|
||||
detection: {
|
||||
caches: ["localStorage", "sessionStorage", "cookie"],
|
||||
},
|
||||
backend: {
|
||||
loadPath: `locales/{{lng}}.json`,
|
||||
},
|
||||
},
|
||||
function (err, t) {
|
||||
dayjs.locale(i18n.language);
|
||||
}
|
||||
);
|
||||
|
||||
i18n.on("languageChanged", (lng) => {
|
||||
dayjs.locale(lng);
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
Reference in new issue
Block a user