Vue version: 2.4.2
vue-i18n version: 7.0.5
Hello,
I'm using both global messages
const i18n = new VueI18n({ locale: getCurrentUserLanguage(), messages });
and local, component based messages:
i18n: {
messages: {
en: { msg: 'msg' },
sk: { msg: 'msg' }
}
}
Everything works as expected.
But when I access global messages in the component that does have local, component-based messages, I get following warning:

I really don't like having bloated console, just to inform me about using fallback to global-translation.
And the warning message is kind of misleading.
Am I doing something wrong? If not, please consider removing this warning message for this particular use-case.
Thanks!
You can avoid with silentTranslationWarn.
https://kazupon.github.io/vue-i18n/en/api.html#vuei18n-class#silenttranslationwarn
Yep I added this:
export default new VueI18n({
locale: 'en',
silentTranslationWarn: process.env.NODE_ENV === 'production'
})
Maybe it's a good point to add this use case in the documentation for Component based localization
Here is the updated link for the specific option above.
That seems to work, but it's a workaround, because it also silences real errros, I believe. This becomes an issue particularly when actively debugging, when these "errors" mix with real translation errors and you lose sight.
Is it _wrong_ to access global translation on a Component based approach? If so, why?
Since 8.8 there is a silentFallbackWarn option that should better fit for people using Component based localization.
Most helpful comment
You can avoid with
silentTranslationWarn.https://kazupon.github.io/vue-i18n/en/api.html#vuei18n-class#silenttranslationwarn