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

This commit is contained in:
XIGE
2026-11-26 15:05:38 +08:00
parent f813b839fa
commit 86b4e24004
21 changed files with 4694 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;