DEV Community

Discussion on: How to build a Jamstack multi-language blog with Nuxt.js

Collapse
 
xeroxi91 profile image
Matteo Moschitta

Thanks Andrea! Really interesting article.

I'm tryng to better understand how to setup the backend structure on Strapi.
Can you provide a repo or the access to the read only instance running on your server at strapi.lotrek.net/ please?

Collapse
 
astagi profile image
Andrea Stagi • Edited

Thank you :) Sure, I've just created the repo github.com/astagi/nuxti18n-strapi-...

My setup is really naive, you may have duplicated translations in the same language for the same post. Unfortunately I don't know how to define two fields "unique" as couple in Strapi.. 😅 If you plan to use GraphQL consider suffixing your fields with language code to support i18n in Strapi, e.g. title_it, title_en, title_fr, content_it, content_en, content_fr and so on... My solution behaves friendly in the admin UI, though.

Collapse
 
xeroxi91 profile image
Matteo Moschitta

Thanks Andrea!

Collapse
 
bzkjyf profile image
bzkjyf

hi Andrea:
how to use @nuxtjs/apollo fetch fields( title_en, title_fr) with lang in the frontend?