Skip to main content

Google Translate Client with `deep-translator`

Project description

Google Translate Client with deep-translator


python3 -m pip install googletranslate-python



from googletranslatepy import Translator

# use a http proxies
translator = Translator(proxies='')

# use a socks5 proxies
translator = Translator(proxies='socks5://')

translator.translate('Life is short, you need Python!')
# '人生苦短,你需要 Python!'


googletranslate --help

# list all available languages
googletranslate -l
# {
#  "afrikaans": "af",
#  "albanian": "sq",
#  "amharic": "am",
#  "arabic": "ar",
# ...

# translate a string text
googletranslate -p 'Life is short, you need Python!'

# translate a file
googletranslate -p

# set proxies to env
GOOGLE_PROXIES= googletranslate 'hello world'

# or add to: ~/.bash_profile
# and then use it directly
googletranslate 'hello world'

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

googletranslate-python-1.0.3.tar.gz (4.4 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page