lushan88a / google_trans_new

A free and unlimited python API for google translate.
MIT License
393 stars 170 forks source link

src always 'en' #52

Closed aravenad closed 11 months ago

aravenad commented 2 years ago

Hi, I wrote this little script for a bigger one and I'm already blocked because when I try to translate something the source is always English so translate() do not translate my string even if I change manually the source and destination.

My script:

from googletrans import Translator translator = Translator() print(translator.detect("Ceci est un essai")) Detected(lang=en, confidence=1) # This is in French not in English... print(translator.translate("Ceci est un essai")) Translated(src=en, dest=en, text=Ceci est un essai, pronunciation=Ceci est un essai, extra_data="{'translat...") # It does not translate it...

If someone can help me I would be really grateful! Thanks.