Skip to content

anilyanduri/language-translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"

About

translates the given string from one language other

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages