formatjs is a set of libraries that help you setup internationalization in any project whether it's React or not.
After following the step above, you should be able to get a minimal application like this running:
If you're not using
React, you can use
@formatjs/intl instead that has the same API. In fact,
react-intl also uses
If you're using React, a minimal React application can look like this:
Our tooling supports
ttypescript for message compilation:
If you're using
babel-plugin-react-intl to your dependencies:
and add it to your
Take a look at
ts-jest guide on how to incorporate custom AST Transformers.