I'm experimenting with the excellent vue-i18n plugin for Vue. It has a neat feature that allows me to embed translations directly into the template that needs them. However if I use them, I'm unable to access the root translation node. Is this model supported or am I just doing it wrong?
main.js
import VueI18n from 'vue-i18n';
Vue.use(VueI18n);
const i18n = new VueI18n({
locale: 'en',
messages: {
en: {
'company-name': 'billy-bob\'s fine steaks.'
}
}
});
Sample.vue
<i18n>
{
"en": {
"title": "@:company-name - yeee hawwww!!!"
}
}
</i18n>
<template>
<div id="app" class="container">
<site-header :title="$t('title')"></site-header>
</div>
</template>