TMX format (.tmx)
TMX (Translation Memory eXchange) is the XML interchange format for
translation memories. A TMX document holds a header declaring the
source language (srclang) and a body of <tu> translation units;
each unit carries one <tuv> translation-unit variant per language,
with optional unit- and header-level <note> and <prop> metadata.
The reader emits one translatable block per <tu>: the source segment
matches the header srclang and a target segment is produced for each
other-language <tuv>. The header attributes and any header-level note
or property are surfaced as a single non-translatable data part ahead
of the blocks, while unit-level notes and properties attach to the
block. This makes TMX usable both as an input for review or alignment
and as an output for exporting a memory. It mirrors Okapi's TMX filter.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
codeFinderRules | array | Regex patterns that match inline codes within translatable text | |
escapeGT | boolean | false | Escape > as > in output XML |
exitOnInvalid | boolean | false | Stop processing when encountering invalid TUs. When false, invalid TUs are skipped. |
processAllTargets | boolean | true | Read all target language TUVs from each TU. When false, only the first target is read. |
useCodeFinder | boolean | false | Enable regex-based inline code detection in translatable text |
Configure these parameters interactively and copy the YAML on the Format Reference.
Examples
Read only the first target
Reduce a multilingual memory to a single target language.
processAllTargets: false
Fail fast on invalid units
Abort processing when a malformed translation unit is found.
exitOnInvalid: true
Processing notes
The source segment matches the header
srclang; one target segment is produced per other-language<tuv>.Header attributes and header-level notes and properties are emitted as a single non-translatable data part ahead of the blocks; unit-level notes and properties attach to the block.
← Back to the Format Reference