diff --git a/ui/src/views/chat/index.vue b/ui/src/views/chat/index.vue index 89bff9b06..71b5cc314 100644 --- a/ui/src/views/chat/index.vue +++ b/ui/src/views/chat/index.vue @@ -25,6 +25,7 @@ import useStore from '@/stores' import Auth from '@/views/chat/auth/index.vue' import { hexToRgba } from '@/utils/theme' import { useI18n } from 'vue-i18n' +import { getBrowserLang } from '@/locales/index' const { locale } = useI18n({ useScope: 'global' }) const route = useRoute() const { application, user } = useStore() @@ -80,7 +81,7 @@ const init_data_end = ref(false) const applicationAvailable = ref(true) function getAppProfile() { return application.asyncGetAppProfile(loading).then((res: any) => { - locale.value = res.data?.language + locale.value = res.data?.language || getBrowserLang() show_history.value = res.data?.show_history application_profile.value = res.data })