Translating with Composition API outside of template tags, does not load the right locale #1916
Closed
4 tasks done
Labels
Status: Need More Info
Lacks enough info to make progress
Reporting a bug?
I'm using Astro + Vue and vue-i18n.
When translating using composition api, inside the "script setup" block, seems that Vue fallbacks to english locale for some reason.
After 10ms on load page (basically onMounted or onCompleted) the translation function uses the right locale fetched from the url.
But, after those 10ms, only the t('a') call inside the template is reactive, while the const variable in the setup script does not update.
Any way I could find a work-around for this?
Expected behavior
I'd expect to find a way to make the object reactive to locale changes.
Reproduction
System Info
Screenshot
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: