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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for simple_googletrans-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d16b7936907db03e2ce25936516821eebe70e9e137d70bdeb8df258c85b72633 |
|
MD5 | 57711fc9a91db1057b4b510e5694ca30 |
|
BLAKE2b-256 | c9cebc798db710842924c126355191345f74b33a6d85fc1c46e6e05d8cff8388 |