I18N

The Elements, Compounds, and Components directories are optional and can be renamed to anything your charset and file system allow without further configuration, so long as there are no collisions with other names. The Templates, Pages, and Scrape directories allow for similar renaming but they must be configured in patternlab-config.json.

The text in the UI, as well as console messages, can be changed by editing source/_ui/i18n/en.json. Replace the blank values with alternate English values if you wish. If you want translation to another language, create a new file named by the abbreviation for the language. For example: source/_ui/i18n/es.json for Spanish. Then, assign that abbreviation to the lang key in pref.yml. In the .json file, assign the translated values to the English keys.

Fepper follows a popular convention of naming the translation function t. (See i18next and react-i18next as other examples.) Be sure never to redefine the global.t variable.

If a need arises for documentation in other languages, you are strongly encouraged to make the translations, and use the options that Open Source offers to distribute them to the rest of the world.