Skip to main content

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

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

translate-1.0.7.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file translate-1.0.7.tar.gz.

File metadata

  • Download URL: translate-1.0.7.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for translate-1.0.7.tar.gz
Algorithm Hash digest
SHA256 4478c22daead543040fc0273a9fa40f1b2eb76580991e58aa143a310c55f0e16
MD5 1afcb5396b3351bb92c839efd2066927
BLAKE2b-256 b7d21a05b1c1973840581ea9aca91b8b61e4d8fc4f248b3a703fc089b9f6fd3d

See more details on using hashes here.

Supported by

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