Spaces:
Sleeping
Sleeping
File size: 464 Bytes
c742717 eba489e c742717 eba489e c742717 eba489e c742717 26ea971 c742717 eba489e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import { computed } from 'vue'
import { enUS, viVN } from 'naive-ui'
import { useAppStore } from '@/store'
import { setLocale } from '@/locales'
export function useLanguage() {
const appStore = useAppStore()
const language = computed(() => {
setLocale(appStore.language)
switch (appStore.language) {
case 'en-US':
return enUS
case 'vi-VN':
return viVN
default:
return enUS
}
})
return { language }
} |