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.

25 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

Adi said...

Get the lates information of Electronics Gadgets Tech gadgets Cool Gadgets New Gadgets Best Gadgets Latest Gadgets Cool New Gadgets

Daniela said...

Interesting post. I have been wondering about this issue,so thanks for posting. I’ll likely be coming back to your blog. Keep up great writing. Find your great Travel News and sing the songs at Free Song Lyric or you can watch the drama at Korea Drama Online one of great korea drama is A Love to Kill if you go to travel to Indonesia learn Learn Indonesia Language first! And find your home cari rumah or make a blog Belajar membuat Blog find your home again rumah dijual and again at jual rumah then if you want buy a new laptop see the Laptop Price List or you can buy a New Blackberry and then take care your Health & Jewerly.

Anonymous said...

Sites that I Like :


Buy Generic Viagra


Generic Cialis Pharmacy


Stanford

nike shox torch said...

Nice work and thanks!
Running
Adidas currently manufactures several running shoesNike shoes, including the adiStar Control 5, the adiStar Ride
Cheap nike shoes
Discount nike shoes
the Supernova Sequence and the Supernova Cushion 7, among others.
Nike shox r4
nike shox torch
nike shox shoes
Adidas also uses kangaroo leather to make their more expensive shoes.
Association football
One of the main focuses of Adidas is football kit and associated equipment.
puma cat
cheap sport shoes
Adidas also provides apparel and equipment for all teams in Major League Soccer. Adidas remain a major company in the supply of team kits for international football teams.
cheap nike shox
cheap nike max
Adidas also makes referee kits that are used in international competition and by many countries and leagues in the world. In the United States, referees wear the Adidas kits in MLS matches even though the primary referee supplier is Official Sports.
nike tn dollar
nike running shoes
The company has been an innovator in the area of footwear for the sport with notable examples including development of the Copa Mondial moulded boot on firm dry pitches for forty years.
nike air max tn
puma shoes
Adidas became renowned for advancing the "Predator" boot design.This design featured a ribbed rubber structure for the upper leather of the shoe, used to accent the movement of the ball.
discount puma shoes
puma mens shoes
The Predator also features the Craig Johnston invented "Traxion" sole. As the development and popularity of Football continued Adidas played a leading role in shaping the style of the play itself.
puma running shoes
puma shoes
FIFA, the sports governing body, commissioned specially designed footballs for use in its own World Cup tournaments to favour more attacking play.

nike shox torch said...

ghd hair straighteners mk4
hair straightners
ghd iv styler hair straightener
ghd hair straightners
cheap ghd hair straighteners

Clothing has always been a thing that has been given a great importance by human beings. It displays the attitude that the people exhibit.
ed hardy clothes
ed hardy shirts
Lots of brands have been existent in the clothing industry and a famous one among them is the Ed hardy clothing brand.
ed hardy jackets
ed hardy hoodies
The brand got its name from the famous American tattoo artist Ed Hardy. He was a very famous tattoo artist and has published many books on tattooing techniques.
ed hardy boots
ed hardy polo shirts
But his tattooing turned into a brand by the efforts of a company called Christian Audiger. This company was a very famous and very powerful company in the field of clothing.
ed hardy shoes
ed hardy jeans
They felt that it would be appropriate to create a brand called Ed hardy and use Hardy's art as the main selling point for the brand. This venture had turned out to be a very successful one and Ed hardy clothing is one of the most famous brands in the clothing industry.
ed hardy outerwear
ed hardy long sleeve shirts
The brand became very famous because it was worn by many famous celebrities like Madonna, Britney spears and also Sylvester Stallone.
ed hardy bags
ed hardy winter boots
The brand has clothes for men, women, and kids. They have also diversified their business by having a lot of accessories to support their clothing business.
ed hardy love kills slowly shirts
ed hardy love kills slowly shoes
ed hardy love kills slowly boots
for men they have a variety of products such as active wear, denim, outwear, swim trucks, sweaters, t-shirts, tops etc.
ed hardy trousers
ed hardy mens
the accessories include things such as belts, caps, scarves, shoes, socks, jeweler, sunglasses, ties and even wallets.
The art works is a unique combination of American and Japanese cultures. The unique selling proposition of the brand is the way in which the company has used the art works of Ed hardy.
ed hardy womens
ed hardy t shirts
ed hardy sunglasses

aa said...

live119|live119論壇|
潤滑液|內衣|性感內衣|自慰器|
自慰套|情趣內衣|
G點|性感丁字褲|吊帶襪|
煙火批發|煙火|情趣用品|SM|充氣娃娃|AV|情趣|
衣蝶|丁字褲|無線跳蛋|性感睡衣|
按摩棒|電動按摩棒|飛機杯|自慰套|
角色扮演|跳蛋|情趣跳蛋|

良哥 said...

Teenagers in a track adidas tennis shoes can go through shoes rate discount adidas sneakers teenage runner well knows that newest adidas shoes 2010 to wear the right shoes discount moncler outlet any cross country among world cheap adidas shoes especially important to the sportsman wholesale adidas shoes a young person growing up adidas shoes outlet Not only do they want to discount moncler t-shirt grow out of their shoes cheap jordan shoes but shape of their feet changes new jordan shoes which means every time we new jordan shoes the time comes to get air jordan 2010 a new pair of shoes eveyone discount jordan shoes a good choice to get jumpman 23 it with a high material Jordan ajf shoes that breathes easily on random Newest Timberland shoes 2010 They should be extended runs cheap Nike shox shoes give enough support to athlets discount brand shoes especially around the ankles area cheap Nike Dunk shoes to avoid injury your ankles AIR MAX shoes outlet when you make your trip 2010 New GHD something in store possible fit Benefit GHD his is also the way to

良哥 said...

Black GHD that don't fit properly only CHI hair straightener but they are not returnable GHD IV Salon Styler Every woman needs to have GHD Rare Styler a few tips to spot Gold GHD the inside of the bag Gray GHD Handbags are considered as Kiss GHD Styler will focus on various items Pink GHD is perfect just for you Pure Black GHD is primarily a company that Pure White GHD if you really want to Purple GHD The qualities that make a cheap bourke dooney handbags running shoe with a good grip authentic dooney bourke bags and material that breathes easily newest dooney bourke handbags They should be sure that moncler vest light enough to do sports dooney bourke new purses but still give enough support to discount dooney bourke handbags outlet around the ankles to avoid injury wholesale Rolex watches you want a high quality moncler we can provide many moncler t-shirts moncler jackets does spend a lot of money moncler coats choose us and you will not regret.dooney bourke totes have the perfect apparel cheap ugg boots you have to know what discount ugg boots there to take your money ugg boots it focuses on your convenience classic ugg boots One of the major attractions ugg classic tall boots

dfadf said...

Microsoft Office 2010
Office 2010
Office 2007
Microsoft Office
Microsoft Office 2007
Office 2007 key
Office 2007 download
Office 2007 Professional
Windows 7
Microsoft outlook 2010

supra footwear said...

thanks.
supra skytop
Supra Muska Skytop Floral
Supra Muska Skytop Navy Denim
Vlado Shoes
Shmack Shoes
Asics Shoes
Reebok Shoes

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

JUN 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.

JUN 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