Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (19 sloc) 910 Bytes

Bing Translate - Simple Ruby Client for Microsoft Translator API

Before you can use the HTTP interface you must obtain a valid Bing API AppID. You may obtain one by visiting


from_language = 'es'
to_language = 'en'
@bt =, to_language, {:app_id => 'YOUR_APP_ID'})
puts @bt.translate('perro')

By default, the translator caches term translations in order to avoid unnecessary requests. This can be globally disabled passing:

:cache => false

in the options hash.

You can also skip the caching only for certain translation requests by passing

:cache => false

to the translate method.

@bt.translate('A longer sentence that won't likely be repeated', { :cache => false })


Copyright © 2011 Christian Hein, released under the MIT license