N
Nuxtβ€’10mo ago
adriaroable

Troubles combining nuxt/content and i18n modules

Hello, I find it hard to combine these two modules. I can make them work separately but in the end I find some cases where I cannot move forward and can't find guides on the docs. So, how would the next be structured in the app? I have terms. md and warn.md documents inside content/legal/. I call these with <ContentDoc /> inside pages/[...slug].vue . And I can access them in localhost:300/legal/terms and localhost:300/legal/warn. The trouble comes when combining to the i18n module with this pages translations. 1) How would you now translate them into another language? Do you use another document (.md) for each language or define the locales in the same and how? 2) How would you use NuxtLink in this case? I tried with the next but I am getting this path: /legal%2Fterms NuxtLink :to="localePath({ name: 'slug', params: { slug: 'legal/terms' } })" class="mr-4">{{ t("Terms") }}</NuxtLink> Do I need to move the pages/[...slug].vue file inside a new pages/legal folder? What would be the best approach for this? Thank you in advance just for reading till the end and trying to understand the situation πŸ˜…
[[ P.S: Would be nice to have a i18n template (ideally includint nuxt/content also) on the Nuxt docs because I think nowadays more and more websites need their pages in multiple languages. ]]
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server