Skip to main content
YAML represents structured data with indentation and is used for application locale catalogs. Hyperlocalise translates string leaves in supported mappings and sequences; anchors and aliases are not supported. Supported extensions: .yaml, .yml.

Source file

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

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

  • The root must be a mapping. Nested mappings use dotted keys; sequences use indexed paths.
  • Quote values that YAML could interpret as numbers, booleans, nulls, or timestamps. Non-string leaves, anchors, and aliases are rejected.
  • Mapping keys cannot contain ., [ or ], which are reserved for flattened paths.
  • Writeback preserves key order and comments where possible. Formatting and scalar styles may be normalized.

Next steps