Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

This is a simple, yet powerful command line translator with google translate behind it. You can also use it as a Python module in your code.

Project description

google-translate-python
=======================

Google translate as Python module & command line tool. No key, no
authentication whatsoever. The default target language is Simplified
Chinese.

利用google
translate实现的命令行工具(translate),也可以当做Python模块用在你的代码中。

Installation
------------

::

pip install translate

Or, you can download the source and

::

python setup.py install

Add sudo in the beginning if you met problem.

Command-Line Usage
------------------

In your command-line:

::

translate "This is a pen."

Or

::

translate -f zh -t ja 我是谁?

Use As A Python Module
----------------------

::

from translate import Translator
translator= Translator(to_lang="zh")
translation = translator.translate("This is a pen.")

The result is in translation, and it’s usually a unicode string.

Change Default Languages
----------------------

In ~/.python-translate.cfg:

::

[DEFAULT]
from_lang = auto
to_lang = 'de'

The cfg is not for using as a Python module.

Project details


Release history Release notifications

History Node

3.5.0

History Node

3.4.0

History Node

3.2.1

History Node

3.2.0

History Node

3.1.0

History Node

2.0.0

This version
History Node

1.0.8

History Node

1.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
translate-1.0.8.tar.gz (3.5 kB) Copy SHA256 hash SHA256 Source None Mar 30, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page