|
@@ -40,7 +40,7 @@
|
|
import 'tippy.js/dist/tippy.css';
|
|
import 'tippy.js/dist/tippy.css';
|
|
|
|
|
|
import { WEBUI_BASE_URL, WEBUI_HOSTNAME } from '$lib/constants';
|
|
import { WEBUI_BASE_URL, WEBUI_HOSTNAME } from '$lib/constants';
|
|
- import i18n, { initI18n, getLanguages } from '$lib/i18n';
|
|
|
|
|
|
+ import i18n, { initI18n, getLanguages, changeLanguage } from '$lib/i18n';
|
|
import { bestMatchingLanguage } from '$lib/utils';
|
|
import { bestMatchingLanguage } from '$lib/utils';
|
|
import { getAllTags, getChatList } from '$lib/apis/chats';
|
|
import { getAllTags, getChatList } from '$lib/apis/chats';
|
|
import NotificationToast from '$lib/components/NotificationToast.svelte';
|
|
import NotificationToast from '$lib/components/NotificationToast.svelte';
|
|
@@ -472,7 +472,7 @@
|
|
const lang = backendConfig.default_locale
|
|
const lang = backendConfig.default_locale
|
|
? backendConfig.default_locale
|
|
? backendConfig.default_locale
|
|
: bestMatchingLanguage(languages, browserLanguages, 'en-US');
|
|
: bestMatchingLanguage(languages, browserLanguages, 'en-US');
|
|
- $i18n.changeLanguage(lang);
|
|
|
|
|
|
+ changeLanguage(lang);
|
|
}
|
|
}
|
|
|
|
|
|
if (backendConfig) {
|
|
if (backendConfig) {
|