ROGoogleTranslate icon indicating copy to clipboard operation
ROGoogleTranslate copied to clipboard

Issue in translating "en" to "en"

Open ghost opened this issue 8 years ago • 2 comments

HI When i giving same language for translation for source and target it is not doing translation

params.source = fromLanguage.text ?? "fr" params.target = toLanguage.text ?? "fr"

Can you please advise on this

THanks

ghost avatar Feb 06 '17 06:02 ghost

Hello

Yeah this is the google api which is returning a 400 "Bad Request" for having the same source and target language. Why would you translate into the same language :)? Is there any use of that?

But you're right. Better error handling would be useful. So it's clear if its a API Error or not..

Cheers

prine avatar Feb 06 '17 09:02 prine

Thanks for reply

Some translator app have this functionality ( though as you said not very useful) , so i think as i would need to add a alert if user tries to do something like this so that it becomes clear to the user that app wont allow this otherwise they might consider that there is some issue with app

Thanks

ghost avatar Feb 06 '17 09:02 ghost