Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby translator client. For Google Translate and Bing Translate

branch: master

Add github link in gemspec.

Signed-off-by: chatgris <jboyer@af83.com>
latest commit ed94009994
Julien Boyer chatgris authored February 18, 2012
Octocat-spinner-32 lib Bump version. January 30, 2012
Octocat-spinner-32 spec Use OpenStruct to build result object. January 30, 2012
Octocat-spinner-32 .gitignore Adpat comment for yard July 28, 2011
Octocat-spinner-32 .rvmrc Initial Import July 26, 2011
Octocat-spinner-32 Gemfile Initial Import July 26, 2011
Octocat-spinner-32 Gemfile.lock Bump version. January 30, 2012
Octocat-spinner-32 LICENSE Initial Import July 26, 2011
Octocat-spinner-32 README.md README. January 30, 2012
Octocat-spinner-32 c3po.gemspec Add github link in gemspec. February 18, 2012
README.md

C3PO

Ruby translator client.

Current backends :

  • Google Translate
  • Bing Translate

Ruby 1.9.2 is strongly recommanded.

Dependencies

libcurl4-gnutls-dev

Installation

Install it with rubygems:

gem install c3po

With bundler, add it to your Gemfile:

gem "c3po", "~>0.1"

Usage

# Define a provider
C3po.configure do |config|
  config.provider = :google
  config.google_api_key = "MYAPIKEY"
end

# Define several provider
C3po.configure do |config|
  config.provider = [:google, :bing]
  config.google_api_key = "MYAPIKEY"
  config.bing_api_key = "MYAPIKEY"
end

# Let's translate
translator = C3po.new('I want this droid to be translated')
translator.translate(:en, :fr) # =>
translator.is # => :en
translator.is?(:de) # => false

Copyright

Copyright (c) 2011 af83

Released under the MIT license

Something went wrong with that request. Please try again.