Google Translate wrapper for Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README
__init__.py
ez_setup.py
pytranslate.py
setup.py

README

#
# Author: Rogério Carvalho Schneider <stockrt@gmail.com>
# URL:    http://stockrt.github.com
#

Translates text and returns resulting sentences from Google Translate.


- Install
    pip install pytranslate

    easy_install pytranslate

    wget --no-check-certificate https://github.com/stockrt/pytranslate/tarball/master -O pytranslate.tar.gz
    tar xzvf pytranslate.tar.gz
    cd stockrt-pytranslate*
    ./setup.py install


- Usage
    import pytranslate

    print pytranslate.translate('hello', sl='english', tl='portuguese')
    print pytranslate.translate('olá', sl='portuguese', tl='english')
    print pytranslate.translate('hello', sl='auto', tl='portuguese')
    print pytranslate.translate('olá', sl='auto', tl='english')
    print pytranslate.translate('hallo', sl='auto', tl='portuguese')
    print pytranslate.translate('hallo', sl='auto', tl='french')
    print pytranslate.translate('bonjour', sl='auto', tl='dutch')
    print pytranslate.translate('olá meu velho amigo', sl='auto', tl='english')