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

Add support for localization #687

Closed
cauebs opened this issue May 6, 2018 · 3 comments
Closed

Add support for localization #687

cauebs opened this issue May 6, 2018 · 3 comments

Comments

@cauebs
Copy link
Contributor

cauebs commented May 6, 2018

It would be great if we could provide multiple versions of a book and switch between them using a menu similar to the one we have for themes.

@mattico
Copy link
Contributor

mattico commented May 6, 2018

This should be fairly straightforward:

  1. Add a config option to set the default language.
  2. Determine & document the folder structure used for the translations.
  3. Change index generation to ignore translations.
  4. Set the lang template parameter in hbs_renderer based on the page path + default config.
  5. Add a menu to the html template + stylus.
  6. In hbs_renderer, look for different versions of the current page and add them to the template parameter.
  7. Set the language used to generate the search index.
  8. Add a cargo feature to disable this functionality, since rustc can't have the search language support due to licensing issues.

Edit:

Links might also need to be adjusted so they point at the page for the current language. This might not be necessary if the correct relative links are used, I'd have to check.

@cauebs
Copy link
Contributor Author

cauebs commented May 6, 2018

Someone pointed out that this might be a duplicate of #5. I'm closing this one.

@Endermanbugzjfc
Copy link

This should be fairly straightforward:

  1. Add a config option to set the default language.
  2. Determine & document the folder structure used for the translations.
  3. Change index generation to ignore translations.
  4. Set the lang template parameter in hbs_renderer based on the page path + default config.
  5. Add a menu to the html template + stylus.
  6. In hbs_renderer, look for different versions of the current page and add them to the template parameter.
  7. Set the language used to generate the search index.
  8. Add a cargo feature to disable this functionality, since rustc can't have the search language support due to licensing issues.

Edit:

Links might also need to be adjusted so they point at the page for the current language. This might not be necessary if the correct relative links are used, I'd have to check.

Could anyone give me some instances, please?

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

3 participants