-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Adding a new language to the site
LizBaker edited this page Mar 14, 2022
·
6 revisions
This wiki assumes that smartling is ready to go
-
packages/gatsby-theme-newrelic/src/i18n/translations/{new locale}.json
This file can be generated by having the en version translated into the desired language. It is responsible for much of the text in theme components -
packages/gatsby-theme-newrelic/src/utils/config/i18n.js
You’ll need to add the language to theSUPPORTED_LOCALESconst, as well asLOCALE_CONFIGS.
If you’d like to update the demo you’ll need to add the new language to the additionalLocales array in the demo Gatsby-config file
-
gatsby-config.js
Add the new language to the additonalLocales array - Update the theme to the version including the changes outlined in the gatsby-theme-newrelic section
-
src/i18n/translations/{new locale}/translation.json
Translate the English version of this file. It is responsible for docs site component text -
src/i18n/nav/{new locale}.json
This is a large file with translations for the entire nav -
scripts/actions/utils/constants.js
Update the LOCALE_IDS object -
scripts/actions/utils/docs-content-tools/i18n-exclusions.yml
Add the new language and any exclusions. Make sure to update both the excludePath and excludeType
- Update the locales table with the new locale