Is it possible to access the current list of translation providers in the Project Settings dialog?

I'm working with the Translation Provider plugin API for Trados 2017. We're building a translation provider plugin which is a broker to multiple translation engines. In the "Project Settings" dialog, under "Translation Memory and Automatic Translation", there's a list of the translation providers associated with the project. When this window is open, BEFORE the user selects "OK", is there any way to access that list? It's not the list of translation providers in the TranslationProviderConfiguration for the project; if you've added or removed translation providers, the TranslationProviderConfiguration is only updated when the user selects "OK". My use case is that I'd like to modify the options for the UI dialog for our translation provider broker depending on which engines are currently selected.

Thanks in advance.

  • Hi ,

    You can take the list of translation providers which are set for current project like this:

    var settings = project.GetTranslationProviderConfiguration();
    var translationProviders = settings.Entries.ToList();

    Kind regards,
    Andrea Ghisa
  • That's basically what I'm doing (I'm iterating over settings.Entries rather than calling ToList(), but that shouldn't make any difference, I don't think). The problem is that this list isn't updated when I select a new provider until the user presses "OK" in the Project Settings window to dismiss the window. It's also not updated when the user removes a provider until the user presses "OK".

    I've just confirmed this with a breakpoint in my Browse() method. I open the "Project Settings" dialog, summon my dialog for my provider, inspect the list of entries in the breakpoint, continue and cancel my dialog. Then I remove a provider, and repeat - the number of items in settings.Entries is the same as it was previously.

    This makes sense - the documentation says:

    "SDL Trados Studio 2017 persists the translation provider list by persisting the Uri and state information. In order to display the list of translation providers in the user interface, SDL Trados Studio 2017 does not necessarily instantiate all the translation providers. For this reason, the UI component also needs to be able to provide display information, given a certain translation provider Uri and state. This way, the translation provider UI component has the possibility of generating this information in a more lightweight way then by instantiating the translation provider itself, which might for instance involve connecting to a server, etc."

    So it doesn't surprise me that Trados isn't actually creating (or removing) a translation provider entry until the user presses "OK"; but it also means that I can't use your method to get the contents of the list of providers as the user sees it.