Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18n Support #42

Open
Mat4m0 opened this issue Jan 28, 2024 · 5 comments
Open

I18n Support #42

Mat4m0 opened this issue Jan 28, 2024 · 5 comments

Comments

@Mat4m0
Copy link

Mat4m0 commented Jan 28, 2024

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

Copy link
Contributor

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 😊

@Mat4m0
Copy link
Author

Mat4m0 commented Jan 29, 2024

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 Mat4m0 closed this as completed Jan 29, 2024
@benjamincanac benjamincanac reopened this Feb 25, 2024
@everfu
Copy link

everfu commented Mar 3, 2024

https://i18n.nuxtjs.org/

@everfu
Copy link

everfu commented Mar 11, 2024

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

@justserdar
Copy link

justserdar commented Feb 12, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants