Translation Memory

Import a TMX file into a translation memory

Changed on

Uploads a TMX file and imports its translation units into the target translation memory (tmUid). The TM must belong to the account identified by accountUid and must not have a machine-generated translation quality type; machine-generated TMs cannot receive TMX imports. See Import a TMX File for more detail on this process.

TMX imports do not preserve plural information: once imported, plural form data for the translations is lost. Files must follow the TMX standard, including a <header> tag with matching srclang and a supported datatype. Re-importing a file with the same fileUri overwrites the previous import for that name.

The import runs asynchronously. Use the returned jobUid to correlate with TMX Import History. Files up to 1648 MB are accepted.

post/tm-tmx-api/v2/accounts/{accountUid}/tmx/file

Request

  • Base URL
    https://api.smartling.com
  • Auth
    HTTP bearer

Path parameters

accountUidstring required

The account’s unique identifier. This can be found in the Smartling Dashboard under Account Settings > API.

Request body multipart/form-data

filestring binary required

The TMX file to import. Must be a well-formed TMX/XML document, up to 1648 MB.

fileUristring required

Path or URI identifying this content within the target TM. Re-importing with the same fileUri overwrites the previous import of that name.

tmUidstring required

Unique identifier (UID) of a translation memory - 12 lowercase alphanumeric characters.

descriptionstring

Optional free-text description of this import.

translatorNameLocationstring

Location of the translator-name metadata within the TMX file, expressed as a @tu.<attribute> or @prop.type.<property> reference (see the TMX file's <tu> and <prop> elements, for example @tu.changeid).

translationDateLocationstring

Location of the translation-date metadata within the TMX file. Recommended whenever available; if omitted, imported units show the import date as their last-updated date.

variantLocationstring

Location of the string-variant metadata within the TMX file.

fileUriLocationstring

Location of the source file/URL metadata within the TMX file.

escapeSmpUnicodeParserDirective'on' | 'off'

Whether to escape supplementary-multilingual-plane Unicode characters while parsing the file.

Example request

{
  "fileUri": "test/tes_file.tmx",
  "tmUid": "j45v1uvsi3tx",
  "translatorNameLocation": "@tu.changeid",
  "translationDateLocation": "@tu.creationdate",
  "variantLocation": "@prop.type.x-SID:SingleString",
  "fileUriLocation": "@prop.type.x-idiom-source-ipath"
}

Response

TMX file accepted and import started.

Changes