How to use i18n For Nuxt 2.17/ Vue 2.7 with Composition API? #2232
Unanswered
KyleBrown-804
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am wondering how or if it is possible to use @nuxtjs/i18n within Nuxt 2.17 & Vue 2.7 with the @nuxt/composition-api, specifically in
<script>
tags as using either setup syntax or defineComponent makes it not possible to simply callthis.$t('translation');
.Furthermore I have found no way so far to use "useI18n" which is the way to do it in Vue/Nuxt ^3. This is in an effort to migrate slowly from 2 to 3 on an existing project. I am aware of the vue-i18n bridge but am not sure if you can use that in tandem with nuxt/i18n or not?
I am able currently to still acces
$t()
in<template>
just not scripts with comp API.Any guidance or suggestions would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions