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: get translation through public google web site without fee

  • Fast: batch, cache and concurrently fetch

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

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 pacakge is optional but recommended to install for best performance in large text translation task.

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.2

  • [fix bug] fix compatible issue with latest google translation service json format changes

  • [fix bug] unit test failure

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.4.0.tar.gz (10.6 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.4.0-py3.4.egg (17.2 kB view details)

Uploaded Egg

goslate-1.4.0-py2.7.egg (16.9 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for goslate-1.4.0.tar.gz
Algorithm Hash digest
SHA256 21b75361db552414548ae2d8776ec052fb61c40b5dba87c76021c2f240603ae9
MD5 c018e015dd305b60c7ebb209825313d8
BLAKE2b-256 7cc2fcbb69418d6169e982beae2456444dfdd177adf0e74140370ed0f537c70c

See more details on using hashes here.

File details

Details for the file goslate-1.4.0-py3.4.egg.

File metadata

  • Download URL: goslate-1.4.0-py3.4.egg
  • Upload date:
  • Size: 17.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for goslate-1.4.0-py3.4.egg
Algorithm Hash digest
SHA256 81dea42bc29beab07f63f65d0008d96847e9a3412045800d9d085372a77fae43
MD5 cd4ec54f4ab839527d23fd55353a9f4d
BLAKE2b-256 ddaeb49a8c32d1bbbc8767f5322c34180d5908367850eadbbeeafff167437cfd

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for goslate-1.4.0-py2.7.egg
Algorithm Hash digest
SHA256 7fce561b05f216c8e83ccd672735336b063dccf69e8ffa1d0be0201841d27520
MD5 4adc22b0e20ce29da7c79d6a71c50386
BLAKE2b-256 30c88d02c984b9850b5289594181e399b2bc16aaee9f5bb462a689040d3781f4

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