You can read and see examples with this API on this web page.
Features
- Fast! Translate an entire book in less than 5 seconds.
- Made for Python 3 but still works on Python 2
- Fast and easy to install, easy to use
- Supports translation from any language
- Highly composable interface, the power of Unix pipes and filters.
- Simple API and documentation
Installation
C:\>cd Python27
C:\Python27>cd Scripts
C:\Python27\Scripts>pip install py-translate
Collecting py-translate
Downloading py_translate-1.0.3-py2.py3-none-any.whl (61kB)
100% |################################| 61kB 376kB/s
Installing collected packages: py-translate
Successfully installed py-translate-1.0.3
C:\Python27\Scripts>
Let's test it with a simple example:>>> import translate
>>> dir(translate)
['TestLanguages', 'TestTranslator', '__author__', '__build__', '__builtins__', '__copyright__', '__doc__', '__file__', '__license__', '__name__', '__package__', '__path__', '__title__', '__version__', 'accumulator', 'coroutine', 'coroutines', 'languages', 'print_table', 'push_url', 'set_task', 'source', 'spool', 'tests', 'translation_table', 'translator', 'write_stream']
>>> from translate import translator
>>> translator('ro', 'en', 'Consider ca dezvoltarea personala este un pas important')
[[[u'I think personal development is an important step', u'Consider ca dezvoltarea personala este un pas important', None, None, 0]], None, u'ro']
>>>