Files
obsidian-to-NotionNext/src/lang/I18n.ts
2023-11-23 11:54:50 +00:00

18 lines
401 B
TypeScript

import {en} from "./locale/en";
import {zh} from "./locale/zh";
import {ja} from "./locale/ja";
export const I18n: {[key: string]:any} = {
en,
zh,
ja,
};
export const I18nConfig = (lang: string): any => {
return I18n[lang];
};
const storedLanguage = window.localStorage.getItem("language");
export const i18nConfig = I18n[storedLanguage || window.navigator.language.split('-')[0] || "en"];