skip to navigation
skip to content

Not Logged In

goslate 1.1.2

Goslate: Free Google Translate API

Package Documentation

Latest Version: 1.2.0

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

    $ echo "hello world" | goslate.py -t zh-CN
    
  • 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
 
File Type Py Version Uploaded on Size
goslate-1.1.2-py2.7.egg (md5) Python Egg 2.7 2013-08-03 14KB
goslate-1.1.2-py3.3.egg (md5) Python Egg 3.3 2013-08-03 14KB
goslate-1.1.2.tar.gz (md5) Source 2013-08-03 8KB
  • Downloads (All Versions):
  • 58 downloads in the last day
  • 337 downloads in the last week
  • 2310 downloads in the last month