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?
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?
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;
Hi Zara Zainol
You can find a code sample here, on how you can import a xliff into a tm.
Kind regards,
Andrea Ghisa
You can find a code sample here, on how you can import a xliff into a tm.
Kind regards,
Andrea Ghisa
Hi
The method ImportInTmWithNameField(string tmPath) in your code sample is doing this job ,but there is a difference between imported result by Trados Studio Import Option and this above code .
When we observe the imported TUs in the TM file, we see "<" and ">" characters and other html attributes. the tags does not recognized when imported by this code. please see this picture:
please help us with this issue.
thanks in advance.
The only type of XLIFF file that you can import into a TM is an SDLXLIFF file.