TMX (Translation Memory eXchange) files are supported in the same way as all other localizable formats. There’s also a custom implementation for pluralized items.

TMX files up to version 1.4b are supported.

Example #️⃣

<?xml version="1.0" encoding="UTF-8"?>
<tmx version="1.4">
  <header 
    adminlang="en" 
    creationtool="localazy.com" 
    datatype="PlainText" 
    o-tmf="Localazy" 
    segtype="sentence" 
    srclang="en"
  />
  <body>
    <tu>
      <tuv xml:lang="en">
        <seg>Hello world!</seg>
      </tuv>
      <tuv xml:lang="fr">
        <seg>Bonjour tout le monde!</seg>
      </tuv>
    </tu>
  </body>
</tmx>

Plurals #️⃣

There are two different way how to define plurals. Using plural groups and with our own extension to TMX. Please note that to the output file, we automatically output both variants at the same time.

Plural groups #️⃣

<?xml version="1.0" encoding="UTF-8"?>
<tmx version="1.4">
  <header 
    adminlang="en" 
    creationtool="localazy.com" 
    datatype="PlainText" 
    o-tmf="Localazy" 
    segtype="sentence" 
    srclang="en"
  />
  <body>
    <tu>
        <prop type="x-Plural-Source-Group">src-plural-id</prop>
        <prop type="x-Plural-Rule">one</prop>
        <tuv xml:lang="en-US">
          <seg>{count} file</seg>
        </tuv>
        <tuv xml:lang="fr-FR">
          <prop type="x-Plural-Translation-Group">tr-plural-id-1</prop>
          <seg>{count] dossier</seg>
        </tuv>
        <tuv xml:lang="es-ES">
          <prop type="x-Plural-Translation-Group">tr-plural-id-2</prop>
          <seg>{count} archivo</seg>
        </tuv>
      </tu>
      <tu>
        <prop type="x-Plural-Source-Group">src-plural-id</prop>
        <prop type="x-Plural-Rule">other</prop>
        <tuv xml:lang="en-US">
          <seg>{count} files</seg>
        </tuv>
        <tuv xml:lang="fr-FR">
          <prop type="x-Plural-Translation-Group">tr-plural-id-1</prop>
          <seg>{count] dossiers</seg>
        </tuv>
        <tuv xml:lang="es-ES">
          <prop type="x-Plural-Translation-Group">tr-plural-id-2</prop>
          <seg>{count} archivos</seg>
        </tuv>
      </tu>
  </body>
</tmx>

Localazy extension #️⃣

<?xml version="1.0" encoding="UTF-8"?>
<tmx version="1.4">
  <header 
    adminlang="en" 
    creationtool="localazy.com" 
    datatype="PlainText" 
    o-tmf="Localazy" 
    segtype="sentence" 
    srclang="en"
  />
  <body>
    <tu>
        <prop type="x-localazy-plural-id">plural-id</prop>
        <prop type="x-localazy-plural-form">one</prop>
        <tuv xml:lang="en-US">
          <seg>{count} file</seg>
        </tuv>
        <tuv xml:lang="fr-FR">
          <seg>{count] dossier</seg>
        </tuv>
        <tuv xml:lang="es-ES">
          <seg>{count} archivo</seg>
        </tuv>
      </tu>
      <tu>
        <prop type="x-localazy-plural-id">plural-id</prop>
        <prop type="x-localazy-plural-form">other</prop>
        <tuv xml:lang="en-US">
          <seg>{count} files</seg>
        </tuv>
        <tuv xml:lang="fr-FR">
          <seg>{count] dossiers</seg>
        </tuv>
        <tuv xml:lang="es-ES">
          <seg>{count} archivos</seg>
        </tuv>
      </tu>
  </body>
</tmx>

HTML entities #️⃣

HTML entities are not allowed in XML files because they are not defined in the XML standard. Localazy can convert HTML entities to their Unicode representation when the file is imported.

This feature can be enabled by adding decode_html_entities to features in the upload section.