Is it available to include a local string to the title meta?
my data object is something like this
pageTitle: 'Loading... | $t("websiteName")',
Any update about that? I would need to this functionality. It would fantastic if it will possible.
Working on it by my self I don't have found a solution.
Thank you!
It should work by using metaInfo as a function directly.
See i18n example with Nuxt.js: https://github.com/nuxt/nuxt.js/blob/dev/examples/i18n/pages/_lang/index.vue#L13
Thank you for the reply, I've tried like specified in the example but for me still not working!
Best regards
@akaneru Instead of defining metaInfo as an object, define it as a function and access this as usual.
export default {
metaInfo () {
return {
title: this.$t("home.title"),
}
}
}
I confirm that your solution works!
Thank you :)
Most helpful comment
@akaneru Instead of defining metaInfo as an object, define it as a function and access this as usual.
export default { metaInfo () { return { title: this.$t("home.title"), } } }vue-meta FAQ