lushan88a / google_trans_new

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

Language names & lang_tgt + lang_src #30

Open ArtanisTheOne opened 3 years ago

ArtanisTheOne commented 3 years ago

Hello, Your library is awesome 😄 I'd like to submit a request or bounce an idea off of you. Currently if you input the full language name into lang_tgt then it will not translate as it seems to not check or validate the lang_tgt input at all.

I see there is a dictionary named LANGUAGES in constants.py, could you bounce lang_tgt off of there to get a full language name's short language code and if it isnt the correct language return incorrect language? Also, it doesnt seem as if lang_src is used as even if I set the lang_src to something incorrect it translates correctly which thus means it is always using auto and auto is not always so reliable...