0.5.2 • Published 5 years ago
@tutorbook/intl v0.5.2
@tutorbook/translations
This package contains all of the translations for Tutorbook's new web
app. We're using
react-intl for the i18n of our website.
Take a look at this blog post for some examples that are similar to how we're localizing our website.
Setup
To install the formatjs CLI (to automatically extract new defaultMessages
defined using the defineMessages React hook and the FormattedMessage React
component) run the following:
$ npm i -g formatjsUsage
To automatically extract new defaultMessages defined using the
defineMessages React hook and the FormattedMessage React component run the
following (from the root of the repository):
$ formatjs extract --out-file src/intl/locales/en.json src/*/lib/*.tsx