lushan88a / google_trans_new

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

Consider adding a simple example at https://github.com/lushan88a/google_trans_new#translate #4

Closed fawazahmed0 closed 3 years ago

fawazahmed0 commented 3 years ago

For example something like this:


from google_trans_new import google_translator  

translator = google_translator()  
translate_text = translator.translate('สวัสดีจีน',lang_tgt='en',lang_src='th' )  
# <Translate text=สวัสดีจีน lang_tgt=th lang_src=en>  
#  default parameter : lang_src=auto lang_tgt=auto 
#  API can automatically identify the src translation language, so you don’t need to set lang_src
print(translate_text)

Why am I saying this? The user will first copy and paste the code in python IDE,to see if it runs fine , the example will break because of proxies.

You can specify url_suffix ,proxies etc example after basic example.

Thanks

Johnne32 commented 3 years ago

For example something like this:

from google_trans_new import google_translator  

translator = google_translator()  
translate_text = translator.translate('สวัสดีจีน',lang_tgt='en',lang_src='th' )  
# <Translate text=สวัสดีจีน lang_tgt=th lang_src=en>  
#  default parameter : lang_src=auto lang_tgt=auto 
#  API can automatically identify the src translation language, so you don’t need to set lang_src
print(translate_text)

Why am I saying this? The user will first copy and paste the code in python IDE,to see if it runs fine , the example will break because of proxies.

You can specify url_suffix ,proxies etc example after basic example.

Thanks

Thanks Fawaz for leading me here. I just tested it and it worked. No more limits

fawazahmed0 commented 3 years ago

For example something like this:

from google_trans_new import google_translator  

translator = google_translator()  
translate_text = translator.translate('สวัสดีจีน',lang_tgt='en',lang_src='th' )  
# <Translate text=สวัสดีจีน lang_tgt=th lang_src=en>  
#  default parameter : lang_src=auto lang_tgt=auto 
#  API can automatically identify the src translation language, so you don’t need to set lang_src
print(translate_text)

Why am I saying this? The user will first copy and paste the code in python IDE,to see if it runs fine , the example will break because of proxies. You can specify url_suffix ,proxies etc example after basic example. Thanks

Thanks Fawaz for leading me here. I just tested it and it worked. No more limits

welcome mate

lushan88a commented 3 years ago

For example something like this:

from google_trans_new import google_translator  

translator = google_translator()  
translate_text = translator.translate('สวัสดีจีน',lang_tgt='en',lang_src='th' )  
# <Translate text=สวัสดีจีน lang_tgt=th lang_src=en>  
#  default parameter : lang_src=auto lang_tgt=auto 
#  API can automatically identify the src translation language, so you don’t need to set lang_src
print(translate_text)

Why am I saying this? The user will first copy and paste the code in python IDE,to see if it runs fine , the example will break because of proxies.

You can specify url_suffix ,proxies etc example after basic example.

Thanks

Thanks for your proposal! :)

fawazahmed0 commented 3 years ago

For example something like this:

from google_trans_new import google_translator  

translator = google_translator()  
translate_text = translator.translate('สวัสดีจีน',lang_tgt='en',lang_src='th' )  
# <Translate text=สวัสดีจีน lang_tgt=th lang_src=en>  
#  default parameter : lang_src=auto lang_tgt=auto 
#  API can automatically identify the src translation language, so you don’t need to set lang_src
print(translate_text)

Why am I saying this? The user will first copy and paste the code in python IDE,to see if it runs fine , the example will break because of proxies. You can specify url_suffix ,proxies etc example after basic example. Thanks

Thanks for your proposal! :)

Thanks for adding a simple basic example :)