actix-website icon indicating copy to clipboard operation
actix-website copied to clipboard

What can we do to prepare the site for multiple languages?

Open sr2ds opened this issue 4 years ago • 2 comments

I think we could have a lang directory within content/docs with a new directory for each language.

 content/
    lang/
       fr/
       pt_br/
          application.md // all files translated for each language

In the sequence, it would be nice to have some language selector in the header, already based on the existing lang directories.

And to display the languages, I imagine that we will need to customize the layouts/code so that it renders the Content based on some URL parameter, for example.

https://actix.rs/docs/getting-started?lang=fr or https://actix.rs/docs/fr/getting-started/.

I don't know if it is a good way, they are just ideas so that we can simplify the process in the long run.

sr2ds avatar Apr 13 '21 17:04 sr2ds

The new website is using docusaurus, and it has support for i18n: https://docusaurus.io/docs/i18n/tutorial#translate-markdown-files

woile avatar Aug 15 '22 08:08 woile

I'm interested in contributing with a Spanish translation!

Je12emy avatar Aug 24 '23 03:08 Je12emy