reactivex.github.io
reactivex.github.io copied to clipboard
Internationalization of reactivex.io
How to add a new language of docs, such as Chinese? Just put the new markdown files to subfolders, such as /cn
?
Good question, and good idea.
One option would be to detect the browser language preferences and serve up different content at the same URLs depending on which languages they desire and which ones we can provide. Another option would be to have language-specific duplicates of the content in language-specific subdirectories, as you suggest.
The first option allows us to also translate the page scaffolding (header/footer/menu/etc.), though I suppose we could do that either way.
Ideally, we'd also add a link tag to the header of any other language-specific versions of the same page, e.g.:
<link rel="alternate" hreflang="cn" href="https://reactivex.io/documentation/cn/observable.html" />
One option would be to detect the browser language preferences and serve up different content at the same URLs depending on which languages they desire and which ones we can provide.
Does Jekyll support it? BTW, the user may want to change the language manually.
+1 for allowing the user to change the language manually, otherwise it can be very annoying
Note that there's a Korean translation in progress now...
Any updates?