Change site lang when changing user lang configuration

This commit is contained in:
William Buezas 2024-11-13 15:26:40 -03:00
parent 3219d44bdb
commit 1dc5bfe90c
1 changed files with 4 additions and 0 deletions

View File

@ -61,6 +61,10 @@ const updateConfigLang = async lang => {
try { try {
await vnFormRef.value.submit(); await vnFormRef.value.submit();
userStore.updateUserLang(lang); userStore.updateUserLang(lang);
const siteLocaleLang = appStore.localeOptions.find(
locale => locale.value === lang
).lang;
appStore.updateSiteLocale(siteLocaleLang);
} catch (error) { } catch (error) {
console.error(error); console.error(error);
} }