WikiTrans Code Pyango View Goopytrans Wikipydia

Goopytrans

19 October 2009 – James – Brooklyn

Earlier this month I posted a python module which handles talking to Google for language translations. It is called Goopytrans (GOOgle PYthon TRANSlator).

Available here

Goopytrans supports translating a single body of text.

>>> goopytrans.translate('bonjour', source='fr', target='en')
'hello'

Multiple bodies of text.

>>> goopytrans.translate_list(('bonjour','merci'), source='fr', target='en')
['hello', 'thank you']

And language detection.

>>> goopytrans.detect('bonjour')
{'isReliable': False, 'confidence': 0.12033016000000001, 'language': 'fr'}

Creative Commons License

blog comments powered by Disqus
Fork me on GitHub