After you collect the strings in your Sphinx documentation and generate a .pot file which includes all the translatable messages, you can use the translation platform POEditor to localize these messages.
How to generate the source file
Sphinx extracts the translatable strings using sphinx-build -b gettext. Each element in the doctree will result in a single string. A collection of .pot files will be available in your output directory after running MessageCatalogBuilder in Sphinx.
These gettext .pot files are supported by the translation platform POEditor and can be used to set up a translation project.
How to set up a translation project
If you don't have a POEditor account, you can create one here. Note you can manage the translation of up to 1 000 strings for free with POEditor.
Once you're logged in to your POEditor account, you can create a project and add the source and target languages to it.
Then import the source .pot file(s) from Sphinx to the POEditor project using the Import functionality in the project page. If you have multiple .pot files, you can keep them grouped in the project by tagging each of them on import. This will also allow you to export each group of strings separately.
The imported source messages will be added as terms to the translation project.
How to translate the Sphinx strings
Add the languages you want, then choose how to translate them:
- AI translation with your own OpenAI, Claude, Gemini, Azure AI or Amazon Bedrock account. You can customize the prompt to match your tone.
- Machine translation with Google Translate, DeepL or Azure AI Translator.
- Your own translators, invited as contributors to specific languages.
- Human translations, ordered from the available LSPs.
Translation memory (available from the Start plan) suggests earlier translations of identical strings, and QA checks and QE feature catch issues before export.
How to export the localized languages
There are multiple export options to download your localized Sphinx documentation in .po format. Note that you shouldn't export to .pot, because this file format won't contain your translations, only the source strings (the terms).
The most basic way to download the .po files is to use the Export functionality in any language page.
If you want to automate the import/export, use the POEditor API, one of the integrations with code hosting platforms or Workflows.
Sphinx produces gettext files, so for more on working with .po files in POEditor, see How to translate gettext files.
Resources:
