//语言 import { lang } from "@/settings/designSetting"; import { createI18n } from "vue-i18n"; //引入vue-i18n组件 import { getLocalStorage } from '@/utils' // 系统语言包 import zhHkSys from "./zhHk/index"; import enUsSys from "./enUs/index"; // 创建i18n实例 export const i18n = createI18n({ legacy: false, globalInjection: true, locale: getLocalStorage("LANG")?.lang || lang, messages: { "zh-HK": zhHkSys, "en-US": enUsSys, }, }); // 语言数组 export const langList = [ { label: "繁体中文", key: "zh-HK", }, { label: "English", key: "en-US", }, ];