S
sishen
Note: parts of this message were removed by the gateway to make it a legal Usenet post.
http://sishen.lifegoo.com/?p=51
Hi, guys. I wrote a ruby client api fro google translate service, then i can
get the answer directly from the terminal, instead of the browser.
It's really convenient for me. Enjoy it,
*Install*
sudo gem install rtranslate
*Usage*
sishen@lifegoo:~$ irb -rubygems
irb(main):001:0> require 'rtranslate'
=> true
irb(main):002:0> $KCODE = 'u'
=> "u"
irb(main):003:0> result = Translate.t("china", Language::ENGLISH,
Language::CHINESE_SIMPLIFIED)
=> "$BCf9q(B"
irb(main):004:0> result = Translate.t("china", Language::ENGLISH,
Language::JAPANESE)
=> "$BCf2Z?ML16&OB9q(B"
irb(main):005:0> result = Translate.t("china", Language::ENGLISH, "zh-TW")
=> "$BCfT"(B"
Really very easy to use, I think. And the source is hosting on
http://rtranslate.googlecode.com. Enjoy it.
http://sishen.lifegoo.com/?p=51
Hi, guys. I wrote a ruby client api fro google translate service, then i can
get the answer directly from the terminal, instead of the browser.
It's really convenient for me. Enjoy it,
*Install*
sudo gem install rtranslate
*Usage*
sishen@lifegoo:~$ irb -rubygems
irb(main):001:0> require 'rtranslate'
=> true
irb(main):002:0> $KCODE = 'u'
=> "u"
irb(main):003:0> result = Translate.t("china", Language::ENGLISH,
Language::CHINESE_SIMPLIFIED)
=> "$BCf9q(B"
irb(main):004:0> result = Translate.t("china", Language::ENGLISH,
Language::JAPANESE)
=> "$BCf2Z?ML16&OB9q(B"
irb(main):005:0> result = Translate.t("china", Language::ENGLISH, "zh-TW")
=> "$BCfT"(B"
Really very easy to use, I think. And the source is hosting on
http://rtranslate.googlecode.com. Enjoy it.