lxp_Maxcess/i18n/index.ts

19 lines
406 B
TypeScript
Raw Permalink Normal View History

2025-04-09 18:55:14 +08:00
import { createI18n } from 'vue-i18n'
import { en } from './en'
import { cn } from './cn'
const message = {
cn: {
...cn,
},
en: {
...en,
},
}
var language = 'cn'
const i18n = createI18n({
locale: language, // 设置语言类型
legacy: false, // 如果要支持compositionAPI此项必须设置为false;
globalInjection: true, // 全局注册$t方法
messages: message,
})
export default i18n