|
|
|
@ -14,13 +14,12 @@ import { |
|
|
|
import { preferences } from '@vben/preferences'; |
|
|
|
|
|
|
|
import { useAbpStore } from '@abp/core'; |
|
|
|
import { useLocalizationsApi } from '@abp/localization'; |
|
|
|
import antdEnLocale from 'ant-design-vue/es/locale/en_US'; |
|
|
|
import antdDefaultLocale from 'ant-design-vue/es/locale/zh_CN'; |
|
|
|
import dayjs from 'dayjs'; |
|
|
|
import localizedFormat from 'dayjs/plugin/localizedFormat'; |
|
|
|
|
|
|
|
import { useAbpConfigApi } from '#/api/core/useAbpConfigApi'; |
|
|
|
|
|
|
|
const antdLocale = ref<Locale>(antdDefaultLocale); |
|
|
|
|
|
|
|
const modules = import.meta.glob('./langs/**/*.json'); |
|
|
|
@ -105,7 +104,7 @@ async function loadAntdLocale(lang: SupportedLanguagesType) { |
|
|
|
*/ |
|
|
|
async function loadAbpLocale(lang: SupportedLanguagesType) { |
|
|
|
const abpStore = useAbpStore(); |
|
|
|
const { getLocalizationApi } = useAbpConfigApi(); |
|
|
|
const { getLocalizationApi } = useLocalizationsApi(); |
|
|
|
let localization = abpStore.localization; |
|
|
|
|
|
|
|
if (lang !== localization?.currentCulture.cultureName) { |
|
|
|
|