Import TMX data automatically using a hotfolder.


This module allows you to automate import of files in TMX format through a hotfolder. To accelerate the import into the database, a new index for the table 'translation' is created. The TMX file contains a series of tu-segments. Each tu-segment contains the translations of a sentence into the various languages​​. If a segment with the same content appears several times in a file, then it is written into the database only once at its first occurrence of the segment.

Example:

<tu creationdate="20060413T132210Z" creationid="">
      <tuv xml:lang="DE-DE">
        <seg>Karton und Folie entfernen.</seg>
      </tuv>

      <tuv xml:lang="IT-IT">
        <seg>Togliere il prodotto dalla confezione.</seg>
      </tuv>
    </tu>
CODE

Configuration:

The hot folder is configured to work with the directories in work/temp/tmx.
The following can be configured:

  • Hotfolder directories

  • Domain 1 und 2

  • Language mapping

  • Use formatings

If the latter checkbox is selected, the formatted entries from the seg-element will also be recognized during the processing of the XML file and become inherited. The range of the formatting may not be deeper than one. For example: <seg><b>Karton und Folie entfernen.</b></seg>.
The abbreviations which can be found in the TMX files are mapped to the corresponding languages​​. The example above shows the usage of 'DE-DE' for 'German'.

Note:

All languages ​​to be imported have to be defined in advance in the censhare Admin Client under "Configuration > Modules >Server TMX > Import TMX file from hot folder" in the section "Translation memory settings". Otherwise, a bug report appears in the log. Files with the extension TMX contain plain XML and are recognized automatically. The TMX file must be prepared as UTF-8.