PasswordPusher
PasswordPusher copied to clipboard
better multi lang support
MkDocs doesn't support language toggling/branching, so Material cannot add this functionality either. To solve this, you would need to build two separate versions of your docs, one for each language configuring the correct search language in mkdocs.yml. By customizing the theme you could link to the other language inside the header or where you want, effectively switching between the two separate builds.
https://github.com/squidfunk/mkdocs-material/issues/867#issuecomment-417339752
I reverted the merge of Korean translations by @James-Lim as it broke some stuff on the page. When we have a solution for multi-lang we can incorporate them again. The files are here:
https://github.com/James-Lim/smart-contract-best-practices/tree/translate/kr
Spec
User story
Users should be able to read the best practices site translated into other languages. Translators with appropriate expertise should be able to contribute by translating the site.
Details
- The translated content should be held in the same branch, in a different directory for each language.
- There should be a dropdown navigation bar menu, for switching between languages.
Helpful information
Our site is built on MK-Docs with significant functionality provided by the Material theme.
This issue thread contains details about how this might be done, including references to a PR to another project which has done done this before.
Bonus points:
If possible it would be nice to be able to make a PR back to either MK docs or Material.
Material for MkDocs supports internationalization (i18n) and provides translations for all template variables and labels: link.
Although still not sure how to add localization to the documentations itself. I'll keep this issue updated on the progress.