🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

sermoa-ruby_translate

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sermoa-ruby_translate

0.1.2
Rubygems
Version published
Maintainers
1
Created
Source

RubyTranslate provides a simple wrapper around the Google Translate API for detecting and translating languages.

Usage:

gem install sermoa-ruby_translate require 'ruby_translate'

Detect:

RubyTranslate.detect("Mein Luftkissenfahrzeug ist voller Aale") => "de"

RubyTranslate.detect("Safisha viatu yangu mara moja!") => "sw"

Translate:

RubyTranslate.translate("Mein Luftkissenfahrzeug ist voller Aale", "en") => "My hovercraft is full of eels"

RubyTranslate.translate("Il y a un singe qui vole dans l'arbre.", "en") => "There is a flying monkey in the tree."

RubyTranslate.translate("They are singing in St Peter's Square", "it") => "Essi sono il canto, in Piazza San Pietro"

RubyTranslate.translate("Eu queria um outro pedacinho de Apfelstrudel, por favor", "sv", "pt") => "Jag ville ha en bit av Apfelstrudel, tack"

Note that the 'from' parameter is optional - if you do not provide it, RubyTranslate first uses detect to guess which language it is.

Acknowledgements:

Thanks to the following excellent sources for inspiration:

FAQs

Package last updated on 10 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts