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

Multilingual websites #2258

Open
Bisaloo opened this issue Dec 19, 2022 · 0 comments
Open

Multilingual websites #2258

Bisaloo opened this issue Dec 19, 2022 · 0 comments
Labels
feature a feature request or enhancement

Comments

@Bisaloo
Copy link
Contributor

Bisaloo commented Dec 19, 2022

Hi,

I'd like with this issue start a conversation about supporting pkgdown websites in multiple languages side-by-side. Last year, pkgdown has started to translate all the text it generates, making it easier to provide pkgdown website in languages other than English.

But providing documentation in more than one language remains challenging. Current attempts that I'm aware of hack their way around it by twisting the mode feature. It remains imperfect because the resulting sitemap is incomplete and language can't be automatically selected based on browser standard mechanisms.

Multilingual websites are available in other documentation generators such as mkdocs or readthedocs.

Here is some steps summarizing how multilingual sites could be achieved in pkgdown:

There should also be a mechanism to automatically detect which version of the README / vignettes should be rendered based on the value of lang. Other tools use a mechanism based on the detection of .fr.md, .es.md, etc. file extensions.

I've been considering whether this should be in pkgdown, or as an extension package but I became convinced it should be part of the main package because it will likely need to re-use some pkgdown internals, especially to create the modified sitemap.

I'm also not sure if all of this should be configured in _pkgdown.yml or if users who want a multilingual website should call a separate build_multilingual_site() wrapper function.

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

No branches or pull requests

2 participants