同步插件源代码并补齐标准项目文件

This commit is contained in:
XIGE
2026-11-26 15:04:45 +08:00
parent 373b563f86
commit 588e7a51f6
28 changed files with 8229 additions and 1 deletions

21
utils/i18n.ts Normal file
View File

@@ -0,0 +1,21 @@
import i18next from "i18next";
import { getLanguage } from "obsidian";
const resources = {
en: { translation: require("../locales/en.json") },
zh: { translation: require("../locales/zh.json") },
};
i18next.init({
lng: getLanguage(),
fallbackLng: "en",
resources,
interpolation: {
escapeValue: false,
prefix: "{",
suffix: "}",
},
keySeparator: "."
});
export default i18next;