i18n a blog with dynamicRouteParams
Hi!
I'm creating a blog.
I created a dynamic page [blog] .vue.
At this point for each page I fetch the data with
useAsyncData
.
So far everything is ok.
However, I need that each article be associated with its corresponding language (with translated url).
Here is the problem.
At this point on the nuxt.config.ts
I set
Ok, now as documentation (https://v8.i18n.nuxtjs.org/options/routing#dynamicrouteparams) inside [body].vue I have set
The problem is that definePageMeta
is a compiler macro therefore, the page meta object cannot reference the component (or values defined on the component).
(https://nuxt.com/docs/guide/directory-structure/pages/#page-metadata)
This means that i cant change dinamically nuxtI18n object like this
At this point dynamicRouteParams:true
is useless and i have no way to translate an article0 Replies