-
Notifications
You must be signed in to change notification settings - Fork 481
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
Any Plans to support i18n? #658
Comments
Definitely no objections to having Documenter help with i18n as much as possible, although there's nothing specific on the roadmap at the moment. Depending on what the specific features might be that you need, it might make sense to implement them as a plugin through a separate package (DocumenterI18N?). Some quick thoughts:
|
We currently using this JuliaCN.jl (still work in progress) to overwrite docstring in binary so we could support i18n in REPL, and translate documents in docs and use current functions of Documenter.jl to generate Chinese documentations. I guess we had the same idea. But it would be great if there is buttons that can be generated by Documenter, like in readthedocs, you can switch English or other languages by click buttons. And yes, it would be very convenient to track out of date, since not all translator knows well about the doc system and git. |
@mortenpi Okay, I found another problem here. When I was trying to add translation against its English version, I cannot use HTML comments at the moment due to #674 Since this is used quite frequently, and for future convenience I'm think adding a syntax for i18n could make this easier, e.g
And by default, the outer markdown contents is
will be equivalent to
And the default language can be set by
When making the docs, there should be an option:
|
My initial reaction is that this gets a bit unwieldy. Having separate Nevertheless, if you would like to try to implement this: it would need a new expander ( It would be helpful if you would try implementing this as a Documenter plugin though and report back about what should be refactored in Documenter and how. It would probably take a while to get to a really working extension package, but it would really help guide Documenter's development I think. |
Oh, sorry I forgot to mention, we are working on it here: https://github.com/Roger-luo/Localize.jl The basic methods have changed. We are using transifex to track the original markdown files now. we are planning to figure out how to dump docstrings to a file format that is supported by transifex: Roger-luo/Localize.jl#7 I totally agree this should be some kind of extension to Documenter.jl. We will use English for Localize.jl's development. And please feel free to help us make such an extension and I will check how to make an expander too. Currently, the JuliaZH.jl simply use module system. However, if a package want to support multiple languages with Documenter in their gh-pages, this does not seem possible at the moment. I was thinking about to have an environment variable to describe the current language in By separately run |
Closing as a duplicate of #658. Let's keep all discussion for translations to one issue. |
Hi JuliaDocs team,
Our old Chinese document (v0.3) in JuliaCN is out of date, we are planning to have a new Chinese document for Julia. Since, currently, julia source is using Documenter.jl, I'm wondering if you have any suggestions on i18n with Documenter.jl? (the Julia-i18n approach may not work for Chinese users, since that web service could be hard to reach in China and it would be more convenient to let user access docs inside REPL).
the original English documents collects docs from each stdlib, so we have to edit julia source (the
doc
directory anddoc
directory instdlib
), it may mess the original julia fork. It might be cleaner to have separated files/dir for Chinese docs. Previously, since all the docs are indoc
with readthedocs services, we simply copied it, but it seems not working anymore with Markdown in the latest version.We would like to hear your suggestions.
Bests,
JuliaCN team
The text was updated successfully, but these errors were encountered: