GoogleTran

Google Translate (Web) API for Python


License
Other
Install
pip install GoogleTran==1.0

Documentation

GoogleTran

Google Translate API for Python

Getting result by posting data to Google Translate

##Features

You can translate long paragraphs directly, module will automatic split paragraphs into small parts, and use multithreading to get the result.

##Installation

GoogleTran requires BeautifulSoup4:

pip install beautifulsoup4

Then use this to install GoogleTran:

pip install googletran

##Usage

from GoogleTran.GoogleTran import googletran
print(googletran('zh-CN','en','你好'))

>Hello

googletran(sl,tl,text)

  • sl - from language
  • tl - to language
  • text - translate text

PS:You can find the country abbreviations here

##Limitation For every 1900 characters, there should be at least one '\n' or '.' to separate paragraphs.