Adding new translations

It seems like translation services typically take care of diffing the data. You send them the whole template file and they send back translation files will all the translated strings (new ones + ones that have already been translated). At least that’s how it works with the provider my company uses. My workflow is as follow:

  • add new translations in the source code with intl.formatMessage()
  • formatjs extract to create the new en.json file (template file)
  • replace the translation files (e.g. es.json, fr.json etc.) with the new ones from the provider
  • formatjs compile to generate the machine files

I also created a test to ensure that each key in en.json has a corresponding key in each translation file.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top