Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: docs for the validator

...

Active set to true, so the language is visible in the language selector on the frontpage.

Validating your file with the json5 validator

If you have the DSpace 7 UI running locally, including the yarn tooling to start it up, there is a handy command line tool to validate your new translation. For example, to validate the Spanish file "es.json5", you can execute:

Code Block
titlejson5 validate
yarn json5 --validate ./resources/i18n/es.json5

Examples of possible errors you might get:

Code Block
JSON5: invalid character 'R' at 1574:179

1574 indicates the line number, and 179 is the 179th character on that line.

This particular mistake occurred where there was an extra space between \ and " in the \" combination used to escape the "

Developer i18n How-to

When you create new keys, update existing keys or the meaning of existing messages, keep the following in mind.

...