Change site lang when changing user lang configuration
This commit is contained in:
parent
3219d44bdb
commit
1dc5bfe90c
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue