Skip to main content
TOML stores keyed configuration and locale strings with tables and typed values. Hyperlocalise translates string leaves and leaves numbers, booleans, dates, and comments in the file structure. Supported extensions: .toml.

Source file

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

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. Hyperlocalise Platform native projects also accept .toml uploads for file translation jobs and segment review. See Supported formats.

Behavior and limitations

  • Nested tables flatten as dotted keys, for example home.title. String arrays use bracket indexes such as home.items[0].
  • Only string values are translated. Numbers, booleans, dates, and other non-string scalars stay in the file.
  • Writeback replaces existing string literals in place and preserves comments, table headers, and quote style when the translated value still fits that style.
  • Array-of-tables ([[name]]) and duplicate keys are rejected. New keys append as dotted assignments at the end of the file.

Next steps