Monday, February 16, 2009

Use Google Translate from command line (Ruby)

If you have Ruby/Gem installed on your computer, you can start using Google Translate from the command line. Just follow these instructions:

$ gem sources -a http://gems.github.com
$ gem install google-translate


Now you have "translate" command available:

$ translate list

- displays the list of supported languages

$ translate detect "hello world"

- detects language of text

$ translate en:ru "hello world"
$ translate en:ru hello world


- translates from English to Russian

$ translate ru "hello world"
$ translate ru hello world


- translated from auto-detected language to Russian.

22 comments:

Pat Parslow said...

The gem is currently called google_translate not google-translate, in case anyone else has trouble finding it ;-)

Thanks for the post

weddingdresses said...

Are you preparing Christmas gifts for your loves ,family and friends now ?
Maybe you can choose us , we always provide the excellent quality products and best after-sale service ,

And recently we have a active promotions :Happy Shopping at Dec,
the content of preference:
10%~15% discount
a Christmas gift
Free shipping!

we are accept paypal ,credit card and western union for payment .
New arrival :Power Balance
winter boots
power balance bracelet
Silly Bands
Reebok Easytone
reebok zigtech
efx bracelet
Moncler Jackets

Unknown said...

When floods do occur, The North Face Sale the water, though turbid for the time, subsides rapidly and soon becomes clear again. Below Hertford, floods are liable to act injuriously, the water remaining longer on the adjoining marsh lands. Mr. Beardmore stated that heavy floodings had taken place in May 1824, in November 1852, and in October 1857, and that at such times large areas of land were, laid under water for several days. Skechers Shoes The marsh-lands on both sides of the lower Thames are not subject to such flooding, as the embankments are found to be sufficient to shut out the tides, and the primitive sewers, marsh-ditches, and tidal outlet-sluices regulate the delivery of flood waters so as to prevent injury to land. The marsh districts on both sides of the lower Lee are now subject to the double evil of flooding and droughts; during long continued dry weather the surface cracks until there are fissures several feet in depth. Flood water is passed much more rapidly down the valley of the Lee in consequence The North Face Sale of the improvements made of late years in the navigation by dredging the channels. Much, however, remains to be done which would improve the conditions of the marsh-land and the health of the people.The evidence as to the water-mills proves that in many instances the dams and ponds act injuriously by preventing land drainage and impeding floods. However useful Discount G Star Sale water-power may have been in former times, when these mills were first established, that use has now been greatly reduced in relative value, and, wherever there is sufficient trade to The North Face Sale make grinding corn a profitable occupation, steam-power has to be brought in as an auxiliary, the improved navigation and railway accommodation facilitating the delivery of coals so as to give an advantage to steam over the constantly alternating and uncertain flow of water. Water-power having diminished in commercial value, and land for agricultural purposes having greatly increased in value, injury to the adjoining lands may be shown to cause an annual money loss to the district Shape Ups Boots. To this money loss must be added injury to health by the retention of large areas of undrained land. Water-mills and mill-dams are proved to be injurious to local properties, but we have no evidence as to any serious pollutions being caused by these mills, other than so far as they cause a partial stagnation in the water and accumulations of mud by ponding.

2011bagnews said...

The much sought-after Chanel Logo Earrings, Cheap replica coach purses as with other Chanel ertqcxy0kmn brand fashion and perfume products, replica Coach wallets for example earrings and jewelry, these particular Chanel accessories are displayed as the epitome of fashion replica Coach handbags is one of the biggest names in the fashion industry , The replica Chanel handbags logo is itself a work of art, replica Gucci purses are designed to be used, not merely displayed , gorgeous silver hardware and, of course
replica Gucci handbags the Chanel logo ,take great care to ensure that the replica they create is durable cheap replica coach bags are one of the most popular designer handbags.

Effective penile enlargement device said...

really nice post...want some more updates though...:)

Vimax penis enlargement pills said...

Yes, this would be nice but if the download link would be given, it would be awesome.

Male Extra enhancement pills said...

This translation relates with very reliable subject.This will be better for the future.

Sizegenetics penis enlargement device review said...

I am not a programming guy, still I have to say this is a fantastic blog for programmers.

Best tablets for small penis size said...

Thanks . Like it very much .

Top Rated Vacuum Cleaners said...

I tried to use google translate as you say here but i never did in right. Please explain better for me :D

Vigaplus said...

This is described an authentic way.More or less the topic is relevant.

hosted virtual call center said...

This blog is really helpful to me, Lots of idea I got from this site.

Anonymous said...

seo google bomb ar carro de ar de carro ar ar carro carro ar

Ferra w said...

Hi, nice for post article information..
klinik obat kuat
klinik farmasi

Jokerslot said...

Sexygslot1688
slotxoth
pgslot
sexygame66
jokerame66

superslot said...

I enjoyed over read your blog post. Your blog have nice information, I got good ideas superslot

Ufa88kh said...

Thank you so much for writing an interesting article on this topic. This really made me think and hope to read more.
wordpress
ufa88kh.blogspot
youtube
ភ្នាល់កីឡាប្រដាល់

kana05 said...

We have sell some products of different custom boxes.it is very useful and very low price please visits this site thanks and please share this post with your friends.สล็อตเว็บใหญ่

somehow08 said...

I was surfing the Internet for information and came across your blog. I am impressed by the information you have on this blog. It shows how well you understand this subject.สล็อตทรูวอเลท

somehow19 said...

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me.เว็บ ตรง

ทาง เข้า finn88 said...

ทาง เข้า finn88 โปรโมชั่นแจ็คพอตแตกกระจายที่สะสมมาให้สมาชิกทั้งหลายแหล่นำไปประกอบกิจการตกลงใจ pg slot และก็คุ้มต่อการเสี่ยงดวงเกมพนันออนไลน์รูปแบบใหม่ชอบใจนักลงทุนอย่างแน่แท้

pg slot said...

pg slot รับฟรีเครดิต ผู้ให้บริการเกมสล็อตออนไลน์ ที่มาแรงที่สุด pg slot รับรองความคุ้มราคาจากถ้าเกิดคูณเริ่มจะมีความรู้สึกว่าของฟรีไม่มีในโลก บอกเลยว่าคุณคิดผิดแล้ว ด้วยเหตุว่าเว็บไซต์ของเราแจกจริงไม่ต้องแชร์