chengxiangling
2025-05-15 65f86f41dedbbbb7030e2f37ce3e001bbca4923a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// i18n.js 或类似的配置文件
import { createI18n } from 'vue-i18n'
import {zh as planZh, en as planEn} from './locales/plan'
import {zh as commonZh, en as commonEn} from './locales/common'
import {zh as basicZh, en as basicEn} from './locales/basic'
// import {zh as testZh, en as testEn} from './test' 
let EN = {
  plan: planEn,
  common: commonEn,
  basic: basicEn,
}
let ZH = {
  plan: planZh,
  common: commonZh,
  basic: basicZh,
}
const i18n = createI18n({
  locale: 'zh', // 设置默认语言为中文
  fallbackLocale: 'zh',
  globalInjection:true,
  legacy: false, // you must specify 'legacy: false' option
  messages: {
    en: EN,
    zh: ZH
  },
})
export default i18n