Translate Omeka S documentation with Sphinx

Omeka S provides a very exhaustive user documentation, but it is available only in English. The Omeka S application is easily translatable using the platform Transifex, but it’s unfortunately not the case for the documentation.

We will see how we solved the problem by using the Sphinx documentation generator.

Currently, the Omeka S documentation is generated by a tool named MkDocs. This tool works well but it does not handle localization natively.
Sphinx is a tool very similar to MkDocs, and it has the advantage of supporting localization natively. It is also the only tool supported by Read the docs (a documentation hosting service) for multilingual documentations. For these reasons, we naturally chose this solution to translate the documentation in french.

Given that MkDocs and Sphinx are very similar tools, it required only a few modifications in Omeka S documentation source files:

  • rebuild the table of contents, and
  • fix some links to other pages or files.

The most curious ones can see the exhaustive list of changes on the Pull Request.

Once Sphinx was set up, we were just a few commands away to extract all translatable strings into PO files. PO files are containers of translations. That’s what is used to translate Omeka S. Most translation tools (Poedit, Pootle, Transifex, to name a few) allow to manipulate those PO files and thus to translate the documentation without having to touch source files.

As I write this, a little more than 40% of the documentation is translated in french. The translation is visible at this address: https://omeka-s-enduser-fr.readthedocs.io.

If you want to contribute to the translation, you can fork the GitHub repository biblibre/omeka-s-enduser-fr, translate the PO files and then create a Pull Request.

Happy translating!

Share

Leave a Reply

Your email address will not be published. Required fields are marked *