Replies: 1 comment
-
+1 interested |
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
Uh oh!
There was an error while loading. Please reload this page.
-
My app consists of different layers, the frontend Vue app, a frontend library, a Node.js backend and a utils package used by both the frontend and backend. All of these need to be internationalized, and obviously I want to use the same translation library/technology for each of them.
I wasn't able to find much documentation about how to use vue-i18n outside of Vue components, but from the TypeScript types it seems that I can probably call
i18n.global.t()
to translate messages. However, as far as I understand, callingcreateI18n()
will require Vue as a dependency. This means that people who want to use my frontend library or my utils package will require Vue as a dependency even if they don't use it in their app at all. This is not ideal.Is there a recommended way to use vue-i18n outside of Vue components? Can I somehow use the
@intlify/*
packages directly?Beta Was this translation helpful? Give feedback.
All reactions