Multiple translations in one reStructuredtext file

Is there any way to achieve the following?

  • The source is the only .rst file in which multi-language translation coexists.
  • Generate markup of web pages into a language (preferably in .html files).
    • This can be either a single file where readers can switch between languages, or several separate .html files.
  • Preferably, the creation of the webpage can be done using rst2html , but other publicly available tools are also welcome.

I want to keep in mind. In foo.rst (I don't mean that I want exactly tags like these):

 ..lang_en: She likes spinach the best. ..lang_de: Sie mag am besten Spinat. 

The result was, as I already mentioned, either one foo.html or a set of foo_en.html and foo_de.html .

+6
source share
1 answer

I understood using sphinx-intl ; it creates folders in the language and updates the translations based on the change in the main file, takes several steps (which requires careful work), but I am satisfied.

If you need a specific example, in this project , I support the English and Japanese versions.

+2
source

All Articles