Install @nuxtjs/i18n within module #2553
Unanswered
homersimpsons
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently writing a Nuxt Module and I'm exposing
@nuxtjs/i18n
translations using$t
.The documentation at https://i18n.nuxtjs.org/guide/extend-messages and https://i18n.nuxtjs.org/guide/extend-pages states that:
I'm okay with this rule, while it may be harder for users.
But I wanted to go further and to automatically install
@nuxtjs/i18n
, so users that do not have@nuxtjs/i18n
setup can still use the module directly.For this, I went with something like:
It looks like it is working, but I do not really find this optimal.
Is there any better way to do so ? Is there any plan (maybe on nuxt side) to ease this ?
Beta Was this translation helpful? Give feedback.
All reactions