Detecting language please wait for.......
I am currently upgrading a Studio plugin from Studio 2015 to Studio 2019.
One part of the plugin consists in importing an SDLXLIFF file in a Groupshare TM. To do so, I used to use the ScheduledTranslationMemoryImportOperation constructor where I would have used the following methods (in the following sequence) to load the import operation on the server:
Create: to create the import operation
Upload: to upload the import file
Queue: to queue the instance of the import operation.
With Studio 2019, it seems the constructor ScheduledTranslationMemoryImportOperation does not exist anymore in the Sdl.LanguagePlatform.TranslationMemoryApi namespace. However, there seems to be a new constructor which might replace the above-mentionend constructor. It is named ScheduledServerTranslationMemoryImport.
My questions are:
1. Does the ScheduledServerTranslationMemoryImport constructor replace the ScheduledTranslationMemoryImportOperation? I can't see any trace of this new constructor in the documentation
2. Apparently, the new constructor has no "Create" and "Upload" methods. Which methods should be applied? Does the "Queue" method cover both the "create" and "upload" process?
Thank you in advance for your support.
Hi Laurent Pierret,
Queue method does not cover create process.
You can use the following code to upload an xliff to an existing server tm:
var uri = new Uri(@"uri");
var translationProviderServer = new TranslationProviderServer(uri, false, "user name", "password");
//Import to existing tm var guid = new Guid("Existing TM Guid"); var tm = translationProviderServer.GetTranslationMemory(guid, TranslationMemoryProperties.None); var langDirection = tm.LanguageDirections;
var import = new ScheduledServerTranslationMemoryImport(langDirection); import.Source = new FileInfo(@"path to xliff"); import.Queue();
Thank you for your reply and sorry for my late reaction. I was quite busy last week.
I will have a deeper look at what you suggested but at first glance, I exactly implemented as you did and I received an error message stating that the path could not be found. As I said, I will check again and come back to you.