Skip to main content

Goslate: Free Google Translate API

Project description

goslate provides you free python API to google translation service by querying google translation website.

It is:

  • Free: you know it ;)

  • Fast: batch, cache and concurrently fetch

  • Simple: single file module, just Goslate().translate('Hi!', 'zh-CN')

Usage

>>> import goslate
>>> gs = goslate.Goslate()
>>> print gs.translate('hello world', 'de')
hallo welt

For romanlized writing (romanlization), batch translation, language detection, proxy support etc., please check API reference

Install

goslate support both Python2 and Python3. You could install it via:

$ pip install goslate

or just download latest goslate.py directly and use

futures is optional but recommended to install for best performance.

CLI

goslate.py is also a command line tool

  • Translate stdin input into Chinese in GBK encoding

    $ echo "hello world" | goslate.py -t zh-CN -o gbk
  • Translate 2 text files into Chinese, output to UTF-8 file

    $ goslate.py -t zh-CN -o utf-8 source/1.txt "source 2.txt" > output.txt

use --help for detail usage

$ goslate.py -h

How to Contribute

What’s New

1.3.0

  • [new feature] Translation in roman writing system (romanlization), thanks for Javier del Alamo’s contribution.

  • [new feature] Customizable service URL. you could provide multiple google translation service URLs for better concurrency performance

  • [new option] roman writing translation option for CLI

  • [fix bug] Google translation may change normal space to no-break space

  • [fix bug] Google web API changed for getting supported language list

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

goslate-1.3.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

goslate-1.3.0-py3.3.egg (16.9 kB view details)

Uploaded Egg

goslate-1.3.0-py2.7.egg (16.4 kB view details)

Uploaded Egg

File details

Details for the file goslate-1.3.0.tar.gz.

File metadata

  • Download URL: goslate-1.3.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for goslate-1.3.0.tar.gz
Algorithm Hash digest
SHA256 9e544848a808e218656aa24257b511a6846f230929c73cd05db3c2174d947a03
MD5 8dc7bc926f09dc57cf4e49d947b8b400
BLAKE2b-256 e59a59e2e8c77b56d5ee46caade1a8717251bd3ad0e7aba0cbf72d232b004b24

See more details on using hashes here.

File details

Details for the file goslate-1.3.0-py3.3.egg.

File metadata

  • Download URL: goslate-1.3.0-py3.3.egg
  • Upload date:
  • Size: 16.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for goslate-1.3.0-py3.3.egg
Algorithm Hash digest
SHA256 6f895aa05c43530c440613a2c9de121bc0aa425697da0714a936a66baa9b30a1
MD5 8db4885b56b52f3cbc5d147b5f72d4dd
BLAKE2b-256 f1416951a37b17d34963fedef1e07ad6ac58b8d5134c0684c73ac91b74b3602f

See more details on using hashes here.

File details

Details for the file goslate-1.3.0-py2.7.egg.

File metadata

  • Download URL: goslate-1.3.0-py2.7.egg
  • Upload date:
  • Size: 16.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for goslate-1.3.0-py2.7.egg
Algorithm Hash digest
SHA256 019062cb0efbf56073f69c430282fff9ab9cb135b74200fa0303aff6549da56e
MD5 3f41fb02567631357ecef4696aa44211
BLAKE2b-256 6fb035b29d2c85ac0722fd7b4f222cdefab4f2f7491400c100afa9773e01d2b4

See more details on using hashes here.

Supported by

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