Dynamic alternate urls and use with localePath (e.g. for using @nuxt/i18n with a headless CMS) #2709
Replies: 2 comments 8 replies
-
Your proposed solution works the same as the I'm not sure if I understand your use case exactly, the issue I closed related to translating parameters but your examples seem to be about translating routes, not its parameters. |
Beta Was this translation helpful? Give feedback.
-
So my basic solution to this is that inside your translation files you add the param for the API so for example
(sorry if there is a mistake in the syntax, just doing it out of the hand.) |
Beta Was this translation helpful? Give feedback.
-
@BobbieGoede
I saw, that you locked issue #2100. Maybe i'm wrong, but
setI18nParams
seems to only be able to set the translated URLs only for the current route. I assume this enables functionality forswitchLocalePath
. But what about multilinugal linking to another dynamic page (e.g. vialocalePath({ name: 'products/red-mug' })
).I feel for complete support of e.g. headless CMSs a function should be provided, that can set all translated paths of all routes at the start of the app (e.g. in
app.vue
) - to achieve the same funtctionality as described on https://i18n.nuxtjs.org/guide/custom-paths).I have proposed a solution at #2100 (comment).
Beta Was this translation helpful? Give feedback.
All reactions