You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started investigating this and found that apparently the composer of the v-t in my example is not the global composer (I don't know why tho, since there is only one instance in the whole app), therefore the watcher for the locale isn't added in the register hook of the directive:
Reporting a bug?
v-t
directive does not update when locale switchesExpected behavior
Changing the locale updates all references of
v-t
Reproduction
Stackblitz: https://stackblitz.com/edit/vitejs-vite-3sfn11?file=src%2FApp.vue
GitHub Repo: https://github.com/DerZade/vue-i18n-locale-switching-bug-report
System Info
Screenshot
No response
Additional context
I started investigating this and found that apparently the composer of the
v-t
in my example is not the global composer (I don't know why tho, since there is only one instance in the whole app), therefore the watcher for the locale isn't added in the register hook of the directive:vue-i18n/packages/vue-i18n-core/src/directive.ts
Lines 102 to 107 in 43072e8
Really dumb question: Why can't we just always add the watcher, why does it only work for the global instance?
Validations
The text was updated successfully, but these errors were encountered: