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:
config_data.yml file. For example to add French, you would change...
1. Adding the new language abbreviation in thelanguages:
- en
...to this:
languages:
- en
- fr
www/_data/site_config.yml file
2. Adding the new language abbreviation in theThe syntax is exactly the same as in step 1 above.
www/_pages and www/_posts folders
3. Creating new versions of all of the files in theThis 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:
- You change the
permalink
so that it includes the subfolder. For example,permalink: /foo
would becomepermalink/fr/foo
. - You change the title by translating it appropriately.
- You change the content by translation it appropriately
translations/en folder
4. Creating new versions of all of the files in theSimilar 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