TMSFNCCloudTranslation

Is there a way to set the "from"-language? At least for the MS Translator API it would be possible to use a from as well as an to - Language.

Is there a way to have an anonymous method instead of the @Callback? This would be very helpful when I need to know what element was translated.
Example. I want to translate the caption of some TWebLabels. I can translate to text, but to assign the translation, I must know what Label was translated.

Thanks a lot for your support!

The from language parameter is not essential as the language detection happens automatically. It's possible, but currently not exposed. Yes, anonymous methods are supported, you can use:

TMSFNCCloudTranslation1.Translate('Hello', 'en',
procedure(const ARequest: TTMSFNCCloudTranslationRequest;
  const ARequestResult: TTMSFNCCloudBaseRequestResult)
begin

end);

Ah, I should have known that.

In German "falsche Freunde" mean words, that are written the same but mean different things in diferent languages, e.g. "bad" is both an english as well as an german word, so is "ass", "angel" and "art" and a lot more. So the from language should be exposed, at least optionally.

I'll write it down and see if we can include the from language.

:- ) I´d appreciate this.

One more: It would be helpful, if the "to"-language were exposed in the ARequest.Translations[i]
Now it is difficult to get the current target language, when more then one langugage is involved.

This would be very helpful - I find the IBM Watson tend to give error 404 "Unable to detect the source language" even on simple translations. In the meantime any hints on how it might be possible to adjust the source code?

The source and requests for IBM are located in *.TMSFNCCloudTranslation.IBM.pas