Wynn Netherland changelog.com/posts

easy_translate: Google (bulk) Translate in Ruby

John Crepezzi of vain fame is back with easy_translate a Ruby wrapper for the Google Translate V2 API.

easy_translate can be installed via Rubygems:

gem install easy_translate

Now you’re ready to translate any string with the same language detection you’ve come to love in the web interface:

EasyTranslate.translate('Open source moves fast. Keep up.', :to => :german)
=> "Open Source entwickelt sich schnell. Halten Sie sich."

Bulk translations are also supported:

EasyTranslate.translate(['Hello', 'Goodbye'], :to => [:es, :it]) => [["Hola", "Adi303263s"], ["Ciao", "Addio"]]

Be sure and check the README for advanced usage.

[Source on GitHub]


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00