EasyTranslate v0.1.1
The project has existed for a little bit, but now I think most of the kinks are ironed out, and its ready for use.
EasyTranslate is a Ruby binding for the Google translate/detect APIs (http://code.google.com/apis/ajaxlanguage/). Its different than other libraries that do the same for a few reasons:
- Only Ruby binding to have support for Bulk Translations
- Only Ruby binding to offer POST support for long translations
- Supports every option in the API, especially API keys and user_ip, which most Ruby bindings skip over.
- Has an extremely clean syntax
1 2 3 4 5 6 7 8 9 10 11 12 | # woah, really? EasyTranslate.translate('Hello, world', :to => :spanish) # => "Hola, mundo" # what about batch translation? => ["¡Hola", "Despedida"] EasyTranslate.translate(['Hello', 'Goodbye'], :to => :spanish) # what if you're even crazier? => [['¡Hola', 'Despedida'], ['Ciao', 'Addio']] EasyTranslate.translate(['Hello', 'Goodbye'], :to => [:es, :it]) # translate something into every language in Google Translate # WITH A SINGLE CALL TO THE API EasyTranslate.translate('hello', :to => EasyTranslate.LANGUAGES.keys) |
The whole thing is licensed under the MIT License, so get out there, make something cool, and let me know how it turns out!
to install:
$ gem install easy_translate
Amy Berwald 12:51 pm on July 30, 2010 Permalink
John,
My name is Amy Berwald and I am a recruiter working with a company in NYC I think you may be interested in. I am hoping to talk to you about it when you have a minute. Let me know what works for you.
Amy Berwald
212-293-4346
Concepts In Staffing