Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions documentation/start-documenting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ To build the docs as HTML, run:
* Replace ``html`` with ``htmllive`` to rebuild the docs,
start a local server, and automatically reload the page in your
browser when you make changes to reST files (Unix only).
* To build a documentation translation, see this
:ref:`guide <docs-build-translation>`.

It is also possible to build only certain pages of the documentation in order
to save time during the build process. Following is an example for building two
Expand Down
26 changes: 26 additions & 0 deletions documentation/translations/translating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,32 @@ Some useful resources:
Translation FAQ
===============

.. _docs-build-translation:

How do I build a docs translation?
----------------------------------

To build a documentation translation for a specific language,
you need to have Python installed and a
local copy of the :github:`CPython repository <python/cpython>` and
translation repository (see table above). The PO files must be placed
in a :samp:`locales/{LANG}/LC_MESSAGES/` (replacing :samp:`{LANG}` with the translation's
language code) folder inside the :file:`Doc/` directory of the CPython repository.

You can then build with :ref:`make <doc-build-make>` by adding
a ``SPHINXOPTS="-D language=LANG"`` variable before the target
or by using :ref:`Sphinx directly <doc-build-sphinx>` and adding a
``-D language=LANG`` option. For example:

.. code-block:: bash

# build the html format of the Polish translation using make
make SPHINXOPTS="-D language=pl" html

# build the html format of the Romanian translation using Sphinx directly
python -m sphinx -b html . build/html -D language=ro


Which version of the Python documentation should I work on?
-----------------------------------------------------------

Expand Down
Loading