Internationalisation

Multi-lingual content on iwgb.org.uk

Posts & pages

All CMS content on iwgb.org.uk must be linked to a piece of content from the 'master' language (English). You can add a linked piece of internationalised content by adding -{lang} to the slug and tagging it appropriately.

For example, to add a spanish translation of the post with the slug news-story, publish a new post with the slug news-story-es and the tag lang:es.

Other text

All other text is stored in langpacks, which you can modify using the langpack editor.

Access the langpack editor

The 'master' language for the central union website is English. Where no text is provided in any other language, the website will fall back to the English value. Where configuration values are stored in the langpack, such as URLs or addresses, these do not need to be duplicated across langpacks.

Branches & job types

The branches and job types that are available are sourced from Airtable, but the internationalised versions are stored in the langpacks. If you add a new branch or job type to Airtable, the space to add the translations won't initially appear. To trigger this:

  1. Add the new branch or job type to Airtable

  2. Purge the iwgb.org.uk content cache

  3. Load the join page in English

  4. Load the langpack editor and add your translations

Why do we do this?

For efficiency, the website only checks for missing branch and job type translations on the first page load. The join page contains both job types and branches (in the navigation). Without loading this page, the new spaces for the data you have added will not appear.

Last updated