Skip to main content

A simple wrapper of googletrans

Project description

A simple wrapper for googletrans

Features

  • default translate to Chinese
  • file or text
  • auto split with nltk when characters exceed 5000

Installation

pip install simple-googletrans

Usage

from simple_googletrans import GoogleTrans

t = GoogleTrans()
t.translate('hello world')

t = GoogleTrans(url='translate.google.com', proxies={'https': 'https://127.0.0.1:1080'}, timeout=15)
t.translate('hello world', dest='fr')

Command Line

gtranslate "hello world!"

gtranslate README.md

gtranslate README.md -o README.cn.txt

# list all languages
gtranslate -l

# use a proxy
gtranslate --proxy 181.211.145.46:8080 README.md

# other options
gtranslate -d fr 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

simple-googletrans-1.0.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

simple_googletrans-1.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file simple-googletrans-1.0.1.tar.gz.

File metadata

  • Download URL: simple-googletrans-1.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8

File hashes

Hashes for simple-googletrans-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5076af7ee9b1130bffb9380d40f6fa3f000e928b2c01a624f4bd5ffccf35655b
MD5 0889c0afaff3c9370dea897b2aff9ae7
BLAKE2b-256 43946733d3b2e8779bc929dc781477afd132adaae3496264202013485d6aec6c

See more details on using hashes here.

File details

Details for the file simple_googletrans-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: simple_googletrans-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8

File hashes

Hashes for simple_googletrans-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d16b7936907db03e2ce25936516821eebe70e9e137d70bdeb8df258c85b72633
MD5 57711fc9a91db1057b4b510e5694ca30
BLAKE2b-256 c9cebc798db710842924c126355191345f74b33a6d85fc1c46e6e05d8cff8388

See more details on using hashes here.

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