Skip to main content
Back to Glossary
Glossary Term

TMX (Translation Memory eXchange)

Abbreviation: TMX

An XML-based standard format for exchanging translation memory data between different CAT tools and translation management systems.

4 min read
file formatstandardtranslation memoryinteroperabilityXML

What is TMX?

TMX (Translation Memory eXchange) is an open XML standard designed for exchanging translation memory (TM) data between different CAT tools and localization systems. Developed by LISA (Localization Industry Standards Association), TMX enables organizations to share and migrate translation assets regardless of the software they use.

TMX has become the de facto standard for TM interchange, supported by virtually all CAT tools in the industry.

TMX Versions

TMX 1.1 (1998)

The original specification, establishing basic structure.

TMX 1.4 (2004)

The most widely supported version:

  • Improved metadata handling
  • Better character encoding support
  • Enhanced segment-level properties
  • Still the most common version in production

TMX 2.0 (Draft)

Proposed updates that were never finalized due to LISA's dissolution.

TMX Structure

Basic Structure

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tmx SYSTEM "tmx14.dtd">
<tmx version="1.4">
  <header
    creationtool="KTTC"
    creationtoolversion="1.0"
    datatype="plaintext"
    segtype="sentence"
    adminlang="en"
    srclang="en"
    o-tmf="KTTC"/>
  <body>
    <tu>
      <tuv xml:lang="en">
        <seg>Hello, world!</seg>
      </tuv>
      <tuv xml:lang="de">
        <seg>Hallo, Welt!</seg>
      </tuv>
    </tu>
  </body>
</tmx>

Key Elements

ElementDescription
<tmx>Root element with version attribute
<header>Metadata about the TM
<body>Container for translation units
<tu>Translation Unit (source + translations)
<tuv>Translation Unit Variant (one language)
<seg>Actual segment text
<prop>Custom properties
<note>Comments and notes

Header Attributes

<header
  creationtool="CAT Tool Name"
  creationtoolversion="3.0"
  datatype="plaintext"
  segtype="sentence"
  adminlang="en"
  srclang="en-US"
  o-tmf="native-format">
</header>
AttributeDescription
creationtoolName of the creating application
creationtoolversionVersion of the creating application
datatypeData type (plaintext, html, xml, etc.)
segtypeSegmentation type (sentence, paragraph, phrase)
adminlangAdministrative language
srclangSource language code
o-tmfOriginal TM format

Translation Unit (TU) Details

Basic TU

<tu tuid="001" creationdate="20241220T120000Z">
  <tuv xml:lang="en">
    <seg>Welcome to our platform.</seg>
  </tuv>
  <tuv xml:lang="fr">
    <seg>Bienvenue sur notre plateforme.</seg>
  </tuv>
</tu>

TU with Metadata

<tu
  tuid="002"
  creationdate="20241220T120000Z"
  creationid="translator1"
  changedate="20241221T150000Z"
  changeid="reviewer1"
  lastusagedate="20241222T100000Z"
  usagecount="5">
  <prop type="domain">legal</prop>
  <prop type="project">Contract Translation</prop>
  <prop type="client">Acme Corp</prop>
  <note>Approved by legal team</note>
  <tuv xml:lang="en">
    <seg>This agreement shall be governed by...</seg>
  </tuv>
  <tuv xml:lang="de">
    <seg>Diese Vereinbarung unterliegt...</seg>
  </tuv>
</tu>

Multilingual TU

<tu tuid="003">
  <tuv xml:lang="en">
    <seg>Save</seg>
  </tuv>
  <tuv xml:lang="de">
    <seg>Speichern</seg>
  </tuv>
  <tuv xml:lang="fr">
    <seg>Enregistrer</seg>
  </tuv>
  <tuv xml:lang="es">
    <seg>Guardar</seg>
  </tuv>
</tu>

Inline Elements

TMX supports inline elements for preserving formatting:

Common Inline Tags

TagPurposeExample
<bpt>Begin paired tag<bpt i="1">&lt;b&gt;</bpt>
<ept>End paired tag<ept i="1">&lt;/b&gt;</ept>
<ph>Placeholder<ph>{0}</ph>
<it>Isolated tag<it>&lt;br/&gt;</it>
<hi>Highlight<hi>term</hi>
<ut>Unknown tagFor unrecognized markup

Example with Formatting

<tu>
  <tuv xml:lang="en">
    <seg>Click the <bpt i="1">&lt;b&gt;</bpt>Save<ept i="1">&lt;/b&gt;</ept> button.</seg>
  </tuv>
  <tuv xml:lang="de">
    <seg>Klicken Sie auf die Schaltfläche <bpt i="1">&lt;b&gt;</bpt>Speichern<ept i="1">&lt;/b&gt;</ept>.</seg>
  </tuv>
</tu>

Language Codes

TMX uses BCP 47 / ISO language codes:

CodeLanguage
enEnglish (general)
en-USEnglish (United States)
en-GBEnglish (United Kingdom)
deGerman (general)
de-DEGerman (Germany)
de-ATGerman (Austria)
frFrench (general)
zh-CNChinese (Simplified)
zh-TWChinese (Traditional)
ruRussian
jaJapanese
koKorean

Best Practices

Creating TMX Files

  1. Use UTF-8 Encoding

    • Always specify encoding="UTF-8"
    • Avoid legacy encodings
  2. Include Metadata

    • Set creation date
    • Include creator information
    • Add domain/project properties
  3. Consistent Language Codes

    • Use standard BCP 47 codes
    • Be consistent with regional variants
  4. Validate Before Export

    • Check XML well-formedness
    • Validate against TMX DTD

Importing TMX

  1. Check Encoding

    • Verify file encoding matches declaration
    • Handle BOM if present
  2. Handle Duplicates

    • Define duplicate resolution strategy
    • Consider source text + context
  3. Map Language Codes

    • Handle variant mappings (en vs en-US)
    • Document any transformations

TMX Quality

IssueSolution
Encoding errorsConvert to UTF-8
Missing language codesAdd xml:lang attributes
Invalid XMLValidate and fix structure
Duplicate TUsMerge or deduplicate
Missing metadataAdd header information

TMX vs Other Formats

TMX vs XLIFF

AspectTMXXLIFF
PurposeTM exchangeDocument localization
FocusSegment pairsFull workflow
ContentFinalized translationsIn-progress work
MetadataTM-specificWorkflow-specific

TMX vs TBX

AspectTMXTBX
ContentSegment pairsTerminology entries
StructureSource + TargetTerms + definitions
Use caseTranslation reuseTerm consistency

Common Issues and Solutions

Character Encoding

Problem: Special characters appear corrupted. Solution: Ensure UTF-8 encoding and proper XML escaping.

<!-- Correct escaping -->
<seg>Price: &lt;$100 &amp; free shipping</seg>

Large File Handling

Problem: TMX files too large to process. Solutions:

  • Split by language pair
  • Split by project/domain
  • Use streaming XML parsers

Version Compatibility

Problem: Different tools support different TMX versions. Solution: Export as TMX 1.4b for maximum compatibility.

FAQ

What is the difference between TMX and TM?

TM (Translation Memory) is the database of translations, while TMX is the file format used to export and exchange that data between different systems.

Can TMX store multiple language pairs?

Yes, a single TMX file can contain translations in multiple languages. Each TU can have multiple TUV elements for different target languages.

What's the maximum size for a TMX file?

There's no technical limit, but very large files (millions of TUs) may cause performance issues. It's recommended to split files larger than 100MB.

How do I convert between TMX versions?

Most CAT tools handle version conversion automatically during import/export. For manual conversion, ensure all required elements are present for the target version.

Is TMX still the industry standard?

Yes, TMX 1.4b remains the most widely supported format for TM exchange. While XLIFF is used for project files, TMX is the standard for TM data interchange.

Can TMX preserve formatting?

Yes, using inline elements (bpt, ept, ph, it) to represent formatting tags. However, the specific handling varies between CAT tools.

Frequently Asked Questions

What is the difference between TMX and TM?

TM (Translation Memory) is the database of translations, while TMX is the file format used to export and exchange that data between different systems.

Can TMX store multiple language pairs?

Yes, a single TMX file can contain translations in multiple languages. Each TU can have multiple TUV elements for different target languages.

What's the maximum size for a TMX file?

There's no technical limit, but very large files (millions of TUs) may cause performance issues. It's recommended to split files larger than 100MB.

How do I convert between TMX versions?

Most CAT tools handle version conversion automatically during import/export. For manual conversion, ensure all required elements are present for the target version.

Is TMX still the industry standard?

Yes, TMX 1.4b remains the most widely supported format for TM exchange. While XLIFF is used for project files, TMX is the standard for TM data interchange.

Can TMX preserve formatting?

Yes, using inline elements (bpt, ept, ph, it) to represent formatting tags. However, the specific handling varies between CAT tools.

KTTC Team
Translation Technology Experts
4 min read

We use cookies to improve your experience. Learn more in our Cookie Policy.