Skip to main content
FormatJS message descriptor catalogs store defaultMessage text with optional description context. Hyperlocalise detects supported descriptor catalogs in JSON and translates their messages for React Intl workflows. Supported extensions: .json.

Source file

Save this example as locales/en-US/messages.json.

Configure your files

Use this i18n.yml for the example, or add its file mapping to your existing bucket. See path templates for other layouts.

Translate

Install the CLI and set OPENAI_API_KEY in your project’s .env.local or shell. You can also configure another AI provider.
The dry run previews the work. The second command writes translations to the configured target path and updates the lockfile.

Behavior and limitations

  • Every top-level entry must be a message object with a string defaultMessage for strict catalog detection.
  • description supplies translation context. Writeback updates defaultMessage while retaining catalog metadata.
  • Preserve ICU arguments and plural/select syntax in messages. Review generated translations with check.
  • Use extract to create a catalog from React Intl source. Static JS/TS catalogs are supported too.

Next steps