Skip to content

Add i18n support

Michael Pöhn requested to merge uniqx/reproducible-website:i18n into master

This adds support for gettext (po) based internationalization using po4a and jekyll-polyglot.

The URLs for the original English text won't change. Each translating will be available within a separate sub-folder. eg: the french translation of /who will be available under /fr/who.

Right now this is configured to en default language and de as the sole active translation. (I didn't translate any texts so it's basically empty.) To enable an additional language it must be added in _config.yml and you have to run bin/i18n.sh to generate po/*.po files for that language.

po4a is currently configured to only publish translated sites where at leat 90% of the text is translated.

This also adds a language chooser to the navbar. It's using a dropdown menu from bootstrap and the translations-icon from the google material design icons library.

This is how the site looks like when a couple of translation-languages are enabled:

Edited by Michael Pöhn

Merge request reports

Loading