Aller au contenu


The mkdocs-static-i18n plugin is setup based on suffix, with is the default English, and used for French:

+ img/
  | figure.png

The mkdocs-material-theme language chooser is configured by this plugin allowing the selection of language at runtime.


Deepl Translation

Translation uses pandoc to convert to html for conversion by Deepl.

Specific pandoc extensions are used to match the capabilities of mkdocs:

markdown extension pandoc extension
tables pipe_tables
pymdownx.superfences backtick_code_blocks
admonition fenced_divs

The differences differences in markdown requires pre/post processing of markdown and html files. These steps are automated in the translate python script (check comments for details). Supporting additional mkdocs features requires updating this script.

  1. Install mkdocs_translate python script:
pip3 install git+
  1. To translate provide environmental variable with Deepl authentication key:
cd core-geonetwork/docs
mkdir target
export DEEPL_AUTH="xxxxxxxx-xxx-...-xxxxx:fx"
  1. And translate a file:
mkdocs_translate french manual/docs/contributing/
  1. To test each stage individually:
mkdocs_translate internal-html manual/docs/contributing/
mkdocs_translate internal-document target/contributing/style-guide.html target/contributing/
mkdocs_translate internal-markdown target/contributing/

cp target/contributing/ manual/docs/contributing/
  1. To test markdown / html round trip:
mkdocs_translate convert manual/docs/contributing/
mkdocs_translate markdown target/contributing/style-guide.html

diff manual/docs/contributing/ target/contributing/