Adding a new language - Vanuatu-National-Statistics-Office/vnso-nsdp-platform GitHub Wiki

At a high level, the process of adding a new language requires the following steps:

1. Adding the new language abbreviation in the config_data.yml file. For example to add French, you would change...

languages:
  - en

...to this:

languages:
  - en
  - fr

2. Adding the new language abbreviation in the www/_data/site_config.yml file

The syntax is exactly the same as in step 1 above.

3. Creating new versions of all of the files in the www/_pages and www/_posts folders

This is typically done by creating a subfolder for each languages. For example, if adding French you would create a folder called www/_pages/fr and another called www/_posts/fr. Within these folders, you duplicate each of the original English files. In each duplicate, you change three things:

  1. You change the permalink so that it includes the subfolder. For example, permalink: /foo would become permalink/fr/foo.
  2. You change the title by translating it appropriately.
  3. You change the content by translation it appropriately

4. Creating new versions of all of the files in the translations/en folder

Similar to step 3 above, this is done by creating a subfolder containing a duplicate of each file in www/translations/et.

5. Ensure all data columns have translation files

TBD