add:国际化

This commit is contained in:
zhangzq
2026-01-04 17:10:04 +08:00
parent 4b6d5e3d0e
commit cbcd26b325

View File

@@ -19,6 +19,7 @@ import './assets/styles/element-variables.scss'
// global css
import './assets/styles/index.scss'
// add-xy start
import i18n from './i18n'
import { fetchMessages } from '@/api/i18n' // 有一个API模块来获取语言文件
// 当前语言可以从本地存储、用户设置或URL参数中获取
const currentLocale = localStorage.getItem('lang')
@@ -82,6 +83,7 @@ Vue.config.productionTip = false
new Vue({
el: '#app',
router,
i18n,
store,
render: h => h(App)
})