Skip to content

Google translate as Python module & command line tool. No key, no authentication whatsoever.

Notifications You must be signed in to change notification settings

gingebot/google-translate-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Google translate as Python module & command line tool. No key, no authentication whatsoever.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%