Yandex component : get language detection

Hi all,

I wonder if someone knows how to get the detected language when using the yandex translate component. It seems to detect automatically the language during a translation request.

So it’s very handful but what if I want to get the detected language ?

Example : I have a same text area used to quickly translate multiple languages words, but I would like to be able to add those translated words to a list in a TDB separated tag for each language. So I need to get the detected language for the translation (which would also allow me to check that the detection was correct). I hope I’m describing clearly.

Thanks in advance for your insights.
acoma

No one on this ?

Maybe my question was not clear ?

This is the Yandex component documentation YandexTranslate

Sorry, this explanation is not clear. Provide an example of what you expect to happen. The documentation says 'if you leave out the source language (when you make the translation request), the service will attempt to detect the source language. Providing just “es” will attempt to detect the source language and translate it to Spanish.'; that means it will just translate it (but not provide a flag saying English was translated to Spanish or whatever).

What have you tried?

The documentation indicates ' Note: Yandex.Translate will attempt to detect the source language. You can also specify prepending it to the language translation, e.g., es-ru will specify Spanish to Russian translation.' Prepending means add (something) to the beginning of something else'. That means if you have a word you want to translate hola in Spanish and want to translate it to Russian you should be able to do it by es-en hola it should return hello Does it work?