Open LasyIsLazy opened 2 years ago
For some reason, I have to use both Vue composition API and Vue legacy API in my project.
I prefer composition API, so I set legacy: false and globalInjection: true, i18n will be in Composition mode and I can use $i18n in code.
legacy: false
globalInjection: true
$i18n
But $i18n.locale always refers to global scope locale, and I can't use local scope in Vue legacy code.
$i18n.locale
Add some config to change injected properties's scope, when the Vue component have locale scope, injected properties can refers to local scope
No response
Or maybe export some API that can access local i18n composer from Legacy Vue code
Additionally, $i18n refers to local scope when there is i18n option in Legacy mode.
i18n
Clear and concise description of the problem
For some reason, I have to use both Vue composition API and Vue legacy API in my project.
I prefer composition API, so I set
legacy: false
andglobalInjection: true
, i18n will be in Composition mode and I can use$i18n
in code.But
$i18n.locale
always refers to global scope locale, and I can't use local scope in Vue legacy code.Suggested solution
Add some config to change injected properties's scope, when the Vue component have locale scope, injected properties can refers to local scope
Alternative
No response
Additional context
No response
Validations