Module: Translate
- Defined in:
- lib/rtranslate/detection.rb,
lib/rtranslate/rtranslate.rb
Overview
The program is a simple, unofficial, ruby client API for using Google Translate.
- Author
-
Dingding Ye ([email protected])
- Copyright
-
Copyright © 2007 Dingding Ye
- License
-
Distributes under MIT License
Defined Under Namespace
Classes: Detection, DetectionResponse, RTranslate, UnsupportedLanguagePair
Class Method Summary collapse
Class Method Details
.d(text) ⇒ Object
31 32 33 34 35 |
# File 'lib/rtranslate.rb', line 31 def Translate.d(text) Detection.detect(text) rescue "Error: #{$!}" end |
.t(text, from, to) ⇒ Object
25 26 27 28 29 |
# File 'lib/rtranslate.rb', line 25 def Translate.t(text, from, to) RTranslate.translate(text, from, to) rescue "Error: #{$!}" end |