Static GitHub Issues

[1856] inject('i18n', new VueI18n(...)) doesn't work in plugin files

prev: client-side alternative to nuxtServerInit
next: Store is empty after redirect.

But app.i18n = new VueI18n(...) works. It means the example in https://nuxtjs.org/guide/plugins fails.

It reported: Cannot read property '_t' of undefined in node_modules/vue-i18n/dist/vue-i18n.common.js:L176:

return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))

related package info:

    "nuxt": "^1.0.0-rc11",
    "vue-i18n": "^7.3.1",
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1670">#c1670</a>)</em></sub></div>