dynamicRouteParams with useAsyncData #1895
Unanswered
luca-smartpricing
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You are right in pointing out the problem that |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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 setOk, 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 articleBeta Was this translation helpful? Give feedback.
All reactions