Importing Content into a Translation Memory
This section explains how to import content into a translation memory.
Import
You can import translation units into any translation memory from the following file formats:
- TMX or TMX.GZ (compressed TMX)
- Supported bilingual document formats: SDLXLIFF, TTX and ITD.
Only bilingual formats are supported. In practice, the import targets a specific translation memory language direction (ITranslationMemoryLanguageDirection). Multilingual TMX files are not supported.
The import functionality is available through the TranslationMemoryImporter class. To import a file into a translation memory, set the target language direction (ITranslationMemoryLanguageDirection), specify the import settings (ImportSetting), and call the Import method.
The OnBatchImported event is raised repeatedly during import, after each batch of translation units has been imported. See ChunkSize. You can cancel the import at any time.
When the import completes, the results are available through the Statistics property. This shows how many translation units were read, added, discarded, merged, overwritten, or failed to import. When you set the InvalidTranslationUnitsExportPath property, all translation units that failed to import are written to a TMX file in that location.