Closed firibz closed 1 year ago
At the moment there is no other way, typically when a locale is changed you probably need to change a few things as well like the URL or the direction if it is RTL so I don't believe reactive languages support is a must-have.
I will tag this as an enhancement tho till I get around to doing it as I'm not sure how it would work in the current API.
@logaretm we have a global locale selector so the user can change the app locale on the fly. I would think that reactive localization is common given that vue-i18n also reactively changes the app locale.
But I know this was closed a while ago so was just wondering if there has been any additional thoughts or progress into this enhancement?
Thanks!
What happened?
I have a parent component (MainLayout) that contains my language switcher, and lots of Form components as children of the MainLayout component, when I switch the locale with
setLocale(i18nLang);
, the previously generated error messages on the Form component are not updating with it. Is there any way other than watching locale in every Form and callingformRef.value.validate();
after locale change? A global way?sample project: https://github.com/firibz/vee-validate-change-locale
Reproduction steps
1. 2. 3. ...
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
https://stackblitz.com/edit/quasarframework-f65w2n?file=src/layouts/MainLayout.vue
Code of Conduct