引入语言包

This commit is contained in:
2026-01-14 12:14:32 +08:00
parent e01690803d
commit 2ce76820da
9 changed files with 406 additions and 21 deletions
+16
View File
@@ -0,0 +1,16 @@
import { useI18n as useVueI18n } from 'vue-i18n'
import { useI18nStore } from '@/stores/modules/i18n'
export function useI18n() {
const { t, locale, availableLocales } = useVueI18n()
const i18nStore = useI18nStore()
return {
t,
locale,
availableLocales,
setLocale: i18nStore.setLocale,
currentLocale: i18nStore.currentLocale,
localeLabel: i18nStore.localeLabel
}
}