You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a catch-all page in Nuxt 3 using [...slug].vue, for example for a news page, in my CMS, My CMS knows the 2 slugs for this page (english: news, dutch: nieuws).
Now what I'm trying is to get this information from my API and then to set this information on the page, so that when I switch language, the correct slug is shown using localePath and switchLocalePath, however I'm not succeeding using the method below
// Page I18n
defineI18nRoute({
paths: pageLanguages // pageLanguages is data from my API, which doesn't seem to work
})
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a catch-all page in Nuxt 3 using
[...slug].vue
, for example for a news page, in my CMS, My CMS knows the 2 slugs for this page (english: news, dutch: nieuws).Now what I'm trying is to get this information from my API and then to set this information on the page, so that when I switch language, the correct slug is shown using
localePath
andswitchLocalePath
, however I'm not succeeding using the method belowEDIT:
I just noticed there's
What's the difference between defineI18nRoute and setI18nParams?
Beta Was this translation helpful? Give feedback.
All reactions