Files

22 lines
393 B
TypeScript
Raw Permalink Normal View History

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;