Vue-i18n 'Cannot read property '_t' of undefined at Proxy.Vue.$t'
Ah, embarrassingly simple, I changed
import i18n from './plugins/i18n'
to
import {i18n} from './plugins/i18n'
and all works now.
If anyone came here with the same issue, but is using export default
, I had this in my main.js:
import translations from './translations';
new Vue({
translations,
...
}).$mount('#app');
Where translations/index.js loaded the plugin and everything like normal. Apparently you have to name the import 'i18n' for this to work correctly:
import i18n from './translations';
new Vue({
i18n,
...
}).$mount('#app');