vue-i18n-next disable console warning

Viewed 2111

How to disable console warning like this :

Not found '21.11.2021' key in 'finnish' locale messages

vue-i18n version is "9.0.0-beta.6".

I am trying silentTranslationWarn: true

const i18n = createI18n({
  messages: {
    en,
    finnish
  },
  fallbackLocale: 'en',
  silentTranslationWarn: true
});

but it doesn't work in this version. Thank you.

2 Answers

Found myself during debugging i18n object.

Two options should be added:

fallbackWarn: false,
missingWarn: false
if (process.env.NODE_ENV === 'development') {
    require("../../mock/mock.js"); // simulation data
    console.warn = () => { }
}
Related