[C#] How to import SDLXLIFF file into TM file?

In Trados Studio, I can open the TM file, and import an SDLXLIFF file into the TM.

How do I achieve this in C# using Trados Studio API?

Parents Reply
  • I Have SDL Trados Studio 2019 SR2, I am getting :"Object reference not set to an instance of an object." error on the last line of the following code:


    var tm = new FileBasedTranslationMemory(pathToTMFile);
     ITranslationMemoryLanguageDirection translationDirection = tm.LanguageDirection;
     var tmImporter = new TranslationMemoryImporter(translationDirection);
     tmImporter.FileTypeManager = tmImporter.GetDefaultFileTypeManager();
     tmImporter.Import(pathToSdlxliffFile); // Error happens: Object reference not set to an instance of an object;


Children