translates the given string from one language other
Ruby
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.
lib
test
MIT-LICENSE
Manifest
README.rdoc
Rakefile
language-translator.gemspec

README.rdoc

Translator

Description

Ruby gem to translate a string from one language to another using google api.

Installation

gem install language-translator

Usage

require 'rubygems' 
require 'translator' 

#To translate 'Hello World' to Hindi
tr = Translator.new()
tr.translate( 'Hello, World', 'hi')     #=> "नमस्ते, दुनिया"

#To translate "नमस्ते, दुनिया" to English
tr.translate('नमस्ते, दुनिया', 'en','hi')       #=> "Hello World"

#From Unknown language to english, from 0.1.2
tr.to_en('नमस्ते, दुनिया')                    #=> "Hello World"