AI & Technology
How to Translate SRT Subtitles Without Losing TimestampsWhy Subtitle Translation Is a Precision Job An SRT file is a tightly structured format. Every subtitle block contains a…
Amanda Lee
PO, YAML, .properties, RESX, XLIFF, and JSON locale files look like lists of sentences, but only the values are prose. The keys are identifiers the code looks up; the placeholders are slots the code fills at runtime; the escapes and markup are syntax the parser depends on. A translator who treats the whole line as text will produce a file that reads beautifully and fails to load, or loads and then crashes the first time a screen formats a number. The failure usually shows up in one language only, which makes it the hardest kind of bug to catch in review.
English has two plural forms, so it is tempting to think every language does. The GNU gettext manual shows why that fails: each language declares its own Plural-Forms rule, English uses nplurals=2, and Russian needs three forms chosen by the last digits of the number. A PO file translated into Russian with only two forms filled in compiles, runs, and prints the wrong grammar for every count ending in 2, 3, or 4. Correct plural handling means producing the number of msgstr entries the target language requires, not the number the source language happened to have.
Word order differs between languages, so a sentence with two values often has to put them the other way round. Positional placeholders such as %1$s and %2$s, or named ones such as {count} and {user}, exist exactly for that: the translation may reorder them, but every one must still be present exactly once. Anonymous placeholders such as a bare %s cannot be reordered safely, which is a problem worth fixing in the source strings before translation rather than after.
Each format has its own sharp edges. In YAML, the specification gives a literal block (|) and a folded block (>) different line-break behaviour, and anchors (&) and aliases (*) let one node reuse another, so both must come through untouched. XLIFF 2.1 wraps original formatting in inline elements such as <ph> and <pc>, which a translation must keep in place around the right words. In .NET, RESX resources are looked up by name at runtime for the current UI culture, so a renamed data element silently falls back to the default language. And a Java .properties file treats the first unescaped =, :, or whitespace as the key separator, so a stray colon in a translated key splits it in two.
Almost always because a placeholder was changed in that language only — renamed, dropped, or duplicated. The code passes the same arguments to every language, so the one translation that no longer matches them fails when that screen is formatted.
Plural rules belong to the language, not to the software. Gettext lets each language declare its own rule; Russian chooses between three forms based on the last digits of the number, so a translation with only two forms prints the wrong grammar for many counts.
Because the classic Properties.load(InputStream) reads the file as Latin-1. Characters outside that range have to be written as \uXXXX escapes, or the file has to be loaded with a reader that uses the right encoding.
Yes, when they are positional (%1$s, %2$s) or named ({count}, {user}) — reordering is often required for natural word order. Every placeholder must still appear exactly once. Bare %s placeholders cannot be reordered safely.
Keys are identifiers, not text. The code asks for a string by its key; a translated key means the lookup fails and the app shows a raw key or falls back to the default language.
Upload a PO, YAML, .properties, or RESX file and get it back with keys, placeholders, escapes, and structure left exactly where they were.
Translate a Locale File Free
AI & Technology
How to Translate SRT Subtitles Without Losing TimestampsWhy Subtitle Translation Is a Precision Job An SRT file is a tightly structured format. Every subtitle block contains a…
Amanda Lee
AI & Technology
How to Translate a PowerPoint Presentation OnlineThe Real Challenge of Translating a Presentation A PowerPoint presentation is more than text. Every slide is a precisel…
Amanda Lee