Google Translate wrapper for Python
Python
Latest commit fec2c76 Mar 23, 2011 @stockrt doc
Permalink
Failed to load latest commit information.
.gitignore gitignore Nov 25, 2010
README doc Mar 24, 2011
__init__.py setup Mar 16, 2011
ez_setup.py ez_setup.py Mar 17, 2011
pytranslate.py more samples and fixing one word duplication on translation Mar 24, 2011
setup.py new setup creating eggs (ez_setup) Mar 17, 2011

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')