Detecting language please wait for.......
Hi all -
In the file editor in Trados, when the translation results are shown in the translation results pane, the name of the translation provider is shown. I'm writing a custom translation engine plugin, and I'm trying to figure out how to control the name of the translation provider. It's seeded from PluginResources.Plugin_NiceName, but it's not retrieved from the TranslationProviderDisplayInfo instance returned by GetDisplayInfo() in the WinForms UI class. It's serialized as the "origin-system" property in the translation unit item in the sdlxliff file, but it's not obvious how to change it; the TranslationUnit class has an Origin property which can be set (it's an enum indicating the type of the source that provided the translation), but there doesn't appear to be any way to access the name of the system to change it.
The reason I'm interested in this is that the plugin I'm building is a proxy for multiple MT engines, and I'd like to display the name of the proxied engine for each translation (especially in the case where more than one engine is eligible to provide a translation). I've modified GetDisplayInfo() to do this, but it's not being used in this case.
Thanks in advance for any pointers.
Hello Sam, would you mind sharing a bit more details about your fix? Id like to implement something similar. Did you modify the property so that it can be set as well (the Name property of the TranslationProvider.cs class)?
Very indirectly. I have an options object that is a member of the translation provider, and that options object is either constructed from the translation provider URI (when the provider is instantiated via the Browse() method of the WinForms UI) or by hand (when it's created by virtue of building a provider to execute an actual translation request). So the Name property is read-only, but the Options property it pulls its value from is not.
I hope this helps a bit - I haven't worked on this code (or, frankly, anything in C#) for several months now.