docs icon indicating copy to clipboard operation
docs copied to clipboard

I18n Support

Open Mat4m0 opened this issue 1 year ago • 5 comments

How to handle i18n translation with the docs? Is there a recommended way for this?

Mat4m0 avatar Jan 28 '24 15:01 Mat4m0

The recommended module for this is https://github.com/nuxt-modules/i18n but I've never tried to plug it with @nuxt/ui-pro. You should be able to make it work in the docs template quite easily as you control all of the code. Let me know how it goes 😊

benjamincanac avatar Jan 29 '24 13:01 benjamincanac

Nuxt Content is easy to understand for me, but to couple everything with i18n into one solution... Maybe you or some of your team members have time to build an example of how it could work in the best way with Nuxt Pro Docs. I don't think I'm the only one who finds this interesting. ;)

Speaking of which, I think a guide to the most important use docs cases (like Docusaurus) would be very, very helpful.

Mat4m0 avatar Jan 29 '24 14:01 Mat4m0

https://i18n.nuxtjs.org/

everfu avatar Mar 03 '24 08:03 everfu

I see in the docs that it is possible to make the content i18n, but e.g. toc etc I didn't find the relevant content

everfu avatar Mar 11 '24 11:03 everfu

Hey guys,

Any idea's how to do multi-lingual md content in content? I was thinking of doing option one: ./1.blog/ nl/<content> en/<content> fr/<content> ./2.docs/ nl/<content> en/<content> fr/<content>

option two I had in mind, more dynamic via: .1/blog/ [locale]/ 1.content.nl.md 1.content.en.md 1.content.fr.md 2.content.nl.md 2.content.en.md 2.content.fr.md

However UI content (site-wide) wise excluding actual page content, UI Pro v3 allows <UApp :locales=[locale]>, is it the idea that we hook up locale here, then propagate it to the pages, then on page, use the content fetch to pull the right locale md while the .yml files populate the UI with properly translated text seperatly?

Like clear distinction I see is:

  • Content for the UI via .yml files (for v-foring links/populating hero header texts etc)
  • Content for actual blog posts via .md files (frontmatter)
  • Routebased path translations like /hello -> /bonjour

I'm currently working on a multi-llingual and multi-domain codebase of nuxt that will use 1 codebase to deploy to 5 plus diff domains. I see potential to have it work from one point, namely the new <UApp> component in v3. Too my experience so far there needs to be a union of these three elements, 1. content translation, 2. ui translation and 3. path translation.

Could I have your feedback/thought about the above?

justserdar avatar Feb 12 '25 14:02 justserdar