mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-12 19:02:49 +00:00
8 lines
284 B
TypeScript
8 lines
284 B
TypeScript
import useAppStore from '~/stores/app'
|
|
|
|
export function t(message: string) {
|
|
const i18n = useNuxtApp().$getI18n()
|
|
const langKey = useAppStore().langKey
|
|
const key = `${langKey}.${message}`
|
|
return i18n.global.t(key) != key ? i18n.global.t(key) : i18n.global.t(message)
|
|
} |