Skip to content

Commit

Permalink
fix: Fix default language when chat language is null (#2204)
Browse files Browse the repository at this point in the history
* fix: Fix default language

* fix: Fix default language when chat language is null

---------

Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
  • Loading branch information
shaohuzhang1 and wangdan-fit2cloud authored Feb 10, 2025
1 parent 9937b61 commit 9113526
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -80,7 +81,7 @@ const init_data_end = ref<boolean>(false)
const applicationAvailable = ref<boolean>(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
})
Expand Down

0 comments on commit 9113526

Please sign in to comment.