Update version to 1.1.1

This commit is contained in:
Jiaxin Peng
2023-11-23 11:54:50 +00:00
parent 040b72b760
commit 630e3a20c2
8 changed files with 63 additions and 9 deletions

View File

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