This page describes how to add page translations to the documentation.

Liquid header parameters

There are four parameters that should be added to page translations:

lang: en
ref:  reference
translator: Person's name(s)
translation_date: date that translation was done

If there is more than one translator, then the translator field would be listed as an array, with the primary translator first:

lang: en
ref:  reference
translator: ["Person One", "Person Two"]
translation_date: date that translation was done

The lang and ref fields are needed to generate the translated pages on the website. The lang field specifies the language of the translation in ISO 639-1 two-letter language codes. The ref parameter is used to link translations together, so it must contain a unique identifier for each page, which is typically the value of the permalink parameter with slashes turned into dashes, and any final /index.html text removed.

The translator and translation_date parameters are displayed on the bottom right of pages, along with the page author(s) and creating/last edited date.

Webpage target locations are controlled by permalinks. It is probably best to give a separate permalink to each translated page, by adding a dash followed by the two-letter ISO 639-1 language code in capital letters before the .html extension. For example, the permalink for the Humdrum tutorial page is:

permalink: /humdrum/getting_started/index.html

So the Polish translation would be:

permalink: /humdrum/getting_started/index-PL.html

And the French translation would be:

permalink: /humdrum/getting_started/index-FR.html


Making Jekyll multilingual by Sylvain Durand, 1 Oct 2016.