You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is it possible just to detect the source language without translating? #65
We don't have a separate endpoint in the API/method in the library for this, but you can just use translateText() and just look at the detected source language (and ignore the text).
Out of interest, is the reason behind you asking this that you would expect a language detection endpoint to be faster or cheaper?
Thank you! Yes, exactly, I was thinking that if the text is already in the desired language, then why translate it? Language detection should use less resources, tokens, etc. Or if I will call the API to translate from English to English, it will not translate or alter the source text, because the detected source language matches the destination language?
Activity
JanEbbing commentedon May 12, 2025
We don't have a separate endpoint in the API/method in the library for this, but you can just use
translateText()and just look at the detected source language (and ignore the text).Out of interest, is the reason behind you asking this that you would expect a language detection endpoint to be faster or cheaper?
rvalitov commentedon May 12, 2025
Thank you! Yes, exactly, I was thinking that if the text is already in the desired language, then why translate it? Language detection should use less resources, tokens, etc. Or if I will call the API to translate from English to English, it will not translate or alter the source text, because the detected source language matches the destination language?