.json.
Source file
Save this example aslocales/en-US/messages.json.
Configure your files
Use thisi18n.yml for the example, or add its file mapping to your existing bucket.
See path templates for other layouts.
Translate
Install the CLI and setOPENAI_API_KEY in your
project’s .env.local or shell. You can also configure another
AI provider.
Behavior and limitations
-
Nested objects use dotted keys such as
home.title; arrays use indexed paths. Translation leaves must be strings. - Numbers, booleans, and other non-string leaves are rejected. Keep application settings separate from locale messages.
- Output preserves the JSON data structure, but indentation and object ordering may change.
-
Strict FormatJS catalogs are detected automatically:
defaultMessageis translated anddescriptionsupplies context. See FormatJS.
Next steps
- Check translations before committing generated files.
- Local translation workflow explains repeat runs.
- Browse all file formats.

