Replies: 1 comment
-
Never found a solution for this that feels great. We have generally provided a dictionary and told ppl using our lib that they need to have Vue-i18n installed in their app and they need to merge our dictionary into theirs; and in our lib relied on We recently have tried to provide our own If you provide your library as a plugin, though, you can at least do the instantiation yourself on installation.. and maybe return the i18n instance to allow users to add their own messages? Not quite sure of where this might cease to work, though. |
Beta Was this translation helpful? Give feedback.
-
I'm working on a vue3 components library plugin. My components contain text in various places. How would i deal with i18n?
Should i always instantiate a new vue-i18n instance in my plugins install function or should i somehow check if there's already one and then somehow add the translation messages to the current instance?
What would be the best approach to this?
Beta Was this translation helpful? Give feedback.
All reactions