2026-09-01 · 7 min read
How to translate an SRT file without losing a line
An SRT file is four things per cue and every one of them can be damaged by a translator. What the format actually is, where translation breaks it, and a five-minute check you can run on any translated file.
SubRip (.srt) is the plainest subtitle format there is, which is exactly why so many tools mishandle it. It looks like text, so it gets treated like text. It is not text. It is a sequence of timed records, and a translation has to preserve the records while changing the words.
What one cue is
A cue is an index, a timecode line, one or two lines of text, and a blank line. That is all:
412 00:23:05,418 --> 00:23:08,054 — Quinn's mom. — She's on her way over.
Three things in that cue are easy to break. The line break separates two speakers, so joining the lines changes who said what. The dash is a speaker marker, not punctuation to be translated. And the timecode gives the cue 2.6 seconds on screen, which decides how many characters a viewer can read before it disappears.
Where translation breaks it
- Line breaks disappear. Any pipeline that moves cues around as line-delimited text loses the second line of a two-line cue, silently. It happened to the first version of this tool and cost 44% of cues before anyone noticed.
- Encoding is guessed wrong. Subtitle files in the wild are frequently Windows-1251 or Windows-1252, not UTF-8. Decoding cp1251 as UTF-8 does not fail: every Cyrillic letter becomes a replacement character and the translator sees garbage. The reader here scores each candidate encoding for plausibility rather than trusting a byte-order mark that is usually absent.
- Italics ship in English. The <i> tag marks voiceover, phone audio and song lyrics. Protect the whole tagged block from the model and a fully italicised cue reaches it already marked do-not-touch, and comes back untranslated. Protect the tags and translate the words inside them.
- Numbers drift. A cue that said 11 and comes back saying 5 is a mistranslation no character-set check can see. Digits survive translation into most languages, so a digit that changed is worth a flag.
- The translation is longer than the slot. Most languages run longer than English; German runs longest. A translated line that fits the meaning but not the 2.6 seconds is unreadable, and a translator that trims it to fit has deleted dialogue.
The five-minute check
You can audit any translated SRT without speaking the target language. Open the source and the translation side by side and check:
- The cue count is identical. A different count means cues were merged, split or dropped.
- Every timecode line is byte-identical. Nothing about the translation should have touched timing.
- Two-line cues are still two lines, and the speaker dashes are still there.
- Search the translation for a few common source-language words. "the" and "you" should appear nowhere in a Bulgarian file. In a Spanish or Turkish file the alphabet is shared, so look for whole English lines instead.
- Pick ten cues with digits in the source and confirm the same digits appear in the translation.
- Count <i> in the source and in the translation. The totals should match.
Those six checks are the structural half of the thirteen this pipeline runs on every cue. The difference is that here they run on all 600 cues rather than the ten you sampled, and a cue that fails goes back to the model with the specific complaint attached instead of being shipped.
VTT is the same problem with a header
WebVTT (.vtt) is SRT with a WEBVTT header, full stops instead of commas in the timecode, and optional cue settings after the timing. Everything above applies unchanged, and the header block has to be carried through untouched. Both formats are accepted here and each is written back in the format it arrived in.
What to do with a file that fails
If a translated file fails the count or timecode checks, the tool that produced it has a structural bug and no amount of re-running will fix it. If it passes those but fails on language, the translation itself is at fault and a second pass with the complaint attached usually is enough. That second pass is what the repair loop here does automatically, and it is the reason the quality report ships with every download.
ProvenSubs translates subtitles and checks every cue before you see it.
Translate an episode free →