Skip to main content
Supported extensions: .jsonc.

Source file

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

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

  • Accepts line comments, block comments, and trailing commas. Message extraction follows the JSON rules.
  • Translation leaves must be strings, including values inside nested objects and arrays.
  • Writeback uses the JSON output path. Do not rely on comments, trailing commas, or original formatting being preserved.

Next steps