Skip to main content

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

Release files for simple-googletrans 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-googletrans 1.0.2
File Size Uploaded
simple-googletrans-1.0.2.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for simple-googletrans 1.0.2
File Interpreter ABI Platform
simple_googletrans-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / simple-googletrans-1.0.2.tar.gz

Download URL simple-googletrans-1.0.2.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
588d3f44f29eaedf0f59eeac8fa6602d61c64025598f600edfdd58dc99bdf1ac
BLAKE2b-256 checksum
How to use checksums
5dd26931436dd16ea4b5b344f3262f1b90534ed3e6e615ebed6ed69f76eb4969
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / simple_googletrans-1.0.2-py3-none-any.whl

Download URL simple_googletrans-1.0.2-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
569a25e14f74177918fd8e45704966bc19d80e36765fe9c096bb4a95ce7aa693
BLAKE2b-256 checksum
How to use checksums
2e4d441a833b119e25abad3e9c1a7207b109ec92e7947d0b83467af741c5693a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page