Skip to main content
Liquid templates combine visible text with expressions and control-flow tags. Hyperlocalise translates hardcoded text while protecting supported template syntax. Translate locale files separately for messages referenced by translation keys. Supported extensions: .liquid.

Source file

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

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

  • Translates hardcoded visible template text and protects Liquid output expressions.
  • Locale-key calls such as the t filter remain template structure. Translate their backing locale files separately.
  • raw, comment, schema, javascript, and stylesheet blocks are preserved verbatim.
  • Standalone Liquid tags form segment boundaries. Template syntax is restored after translation.

Next steps