i18n library offers two parameters to silence i18n warnings here. But these are not working on my Nuxt project. Actually, it was my mistake to didn’t to look at the guide well.
I was using the options like so:
// nuxt.config.js file
...
i18n: {
silentTranslationWarn: true,
silentFallbackWarn: true,
defaultLocale: 'en',
strategy: 'prefix_and_default',
vueI18nLoader: true,
lazy: true,
langDir: 'lang/',
...
But it should be like this:
// nuxt.config.js file
...
i18n: {
vueI18n:{
silentTranslationWarn: true,
silentFallbackWarn: true,
},
defaultLocale: 'en',
strategy: 'prefix_and_default',
vueI18nLoader: true,
lazy: true,
langDir: 'lang/',
...
The silent options must be under the “vueI18n” keyword. Now it is working well.