Web Component Fails to Dynamically Update Vue.js i18n Messages in Angular Project #10138
Unanswered
santhanakrishnanstark
asked this question in
Help/Questions
Replies: 2 comments
-
I think the problem is that you provide the ref's value, which will not be reactive - you need to pass the ref itself. - Vue.provide(VueI18n.I18nInjectionKey, i18n.value)
+ Vue.provide(VueI18n.I18nInjectionKey, i18n) Wether or not that works with vue-i18n I don't know. Manually providing the instance like this is not a normal documented way of usage. Either way, this is not a Vue bug, it's a usage issue for |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think the provide, inject method is not working with Angular after converting vue component into web component |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Vue version
v3.4.14
Link to minimal reproduction
https://stackblitz.com/edit/stackblitz-starters-4hu361?file=src%2Fmain.ts
Steps to reproduce
What is expected?
Once the toggle button is clicked, it should render the web component with the message
Hello i18n Working !
What is actually happening?
Once the toggle button is clicked, the vuei18n key
message.greet
is rendering instead of the actual value.System Info
No response
Any additional comments?
In Vue the
Vue.provide(VueI18n.I18nInjectionKey, i18n.value);
suppose to pass the updatedi18n.value
But it's not passing.While Using this web component in Angular I'm having this issue. How to pass the updated
i18n.value
into provide.Beta Was this translation helpful? Give feedback.
All reactions