This commit is contained in:
ljw
2024-10-22 12:40:44 +08:00
parent 933c955fc3
commit bd490d9f7e
2 changed files with 396 additions and 2 deletions
+7 -2
View File
@@ -1,12 +1,17 @@
import en from '@/utils/i18n/en.json'
import zhCN from '@/utils/i18n/zh_CN.json'
import ko from '@/utils/i18n/ko.json'
import { useAppStore } from '@/store/app'
export function T (key, params, num = 0) {
const appStore = useAppStore()
const lang = appStore.setting.lang
const trans = lang === 'zh-CN' ? zhCN : en
const tran = trans[key]
const trans = {
'en': en,
'zh-CN': zhCN,
'ko': ko,
}
const tran = trans[lang][key]
if (!tran) {
return key
}