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

better multi lang support #162

Open
maurelian opened this issue Aug 30, 2018 · 3 comments
Open

better multi lang support #162

maurelian opened this issue Aug 30, 2018 · 3 comments

Comments

@maurelian
Copy link
Contributor

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.

squidfunk/mkdocs-material#867 (comment)

@muellerberndt
Copy link
Contributor

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

@maurelian
Copy link
Contributor Author

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.

@shayanb
Copy link
Contributor

shayanb commented Jan 11, 2019

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.

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

No branches or pull requests

4 participants
@shayanb @muellerberndt @maurelian and others