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

  • [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.3.2.tar.gz (10.4 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.2-py3.4.egg (16.8 kB view details)

Uploaded Egg

goslate-1.3.2-py2.7.egg (16.5 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for goslate-1.3.2.tar.gz
Algorithm Hash digest
SHA256 df98a2660b2ce99581b3508050b29e2acad91c9164aec5dc2b093af58ad0516f
MD5 3a375aa11fe5c2ed7477cfec76083002
BLAKE2b-256 3a604b3bf02c7114ca43a006a0ecafaac5e48e165e396f7e0107afa29ef95dfb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for goslate-1.3.2-py3.4.egg
Algorithm Hash digest
SHA256 e96c144ae57b9e8acb5996a0ad466ae60bcd5371cbe7850a2d3b8896a7ecb9f6
MD5 361d1cca048c70f34323db214afb917d
BLAKE2b-256 7f7a65b43e6b90291a7b1ab42d2600c6df4d5a21dcb5fa604df4293103a7ae4d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for goslate-1.3.2-py2.7.egg
Algorithm Hash digest
SHA256 6272a4a5feb5dfeeba01d112f25262a89f526b89339b8a74a7c6d1f0b8aff2f7
MD5 26b2320513122518514d761d97be1af4
BLAKE2b-256 09a8e7f9a18bbcf84e02b17261ceee75641ee7e0a53fff417b065372805f4ae7

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