Skip to content
A simple Ruby interface to Bing's translation API. https://rubygems.org/gems/bing_translator
Ruby HTML
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.rvmrc
Gemfile
Gemfile.lock
LICENSE
README.md
bing_translator.gemspec

README.md

Bing Translator

This gem wraps the Micrsoft Bing HTTP Translate API. I am in no way affiliated with Microsoft or Bing. Use this gem at your own risk.

Released under MIT. Tested with MRI 1.8.7 only.

Installation

To use this rubygem:

$ sudo gem install bing_translator

With bundler:

gem "bing_translator", "~> 0.0.2"

Usage

require 'rubygems'
require 'bing_translator'
translator = BingTranslator.new 'Your_API_Key'
spanish = translator.translate 'Hello. This will be translated!', :from => 'en', :to => 'es'

# without :from for auto language detection
spanish = translator.translate 'Hello. This will be translated!', :to => 'es'

locale = translator.detect 'Hello. This will be translated!' # => :en
Something went wrong with that request. Please try again.