Skip to main content
SubRip (SRT) subtitle files contain numbered cues with timestamps and text. Hyperlocalise translates cue text while retaining timings; it does not retime subtitles for a different reading speed. Supported extensions: .srt.

Source file

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

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

  • Each cue is one translation unit, including multiline text. Keys are sequential, such as srt.0001.
  • Cue numbers, timestamps, and positioning remain unchanged. Timing is supplied as translation context.
  • Writeback replaces cue text. Extra keys are ignored, and blank lines inside translated text are removed to avoid creating new cues.
  • Review subtitle length and reading speed separately; translation does not retime your video.

Next steps