Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
translates the given string from one language other
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

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"
Something went wrong with that request. Please try again.