Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

82 lines (48 sloc) 2.42 KB

Copycopter Client

This is the client gem for integrating apps with Copycopter.

The client integrates with the I18n gem so that you can access copy and translations from a Copycopter project.


Just install the gem:

gem install copycopter_client

Rails 3

Add the following line to your Gemfile:

gem "copycopter_client"

Then run bundle install.

Rails 2

Add the following line to your config/environment.rb:

config.gem 'copycopter_client'

Then run rake gems:install. We also recommend vendoring the gem by running rake gems:unpack:dependencies GEM=copycopter_client.


Add the following to your application:

CopycopterClient.configure do |config|
  config.api_key = "YOUR API KEY HERE"

In a Rails application, this should be saved as config/initializers/copycopter.rb. You can find the API key on the project page on the Copycopter website. See the CopycopterClient::Configuration class for a full list of configuration options.


You can access blurbs from Copycopter by using I18n.translate. This is also aliased as translate or just t inside Rails controllers and views.

# In a controller
def index
  flash[:success] = t("users.create.success", :default => "User created")

# In a view
<%= t(".welcome", :default => "Why hello there") %>

# Global scope (for example, in a Rake task)
I18n.translate("system.tasks_complete", :default => "Tasks complete")

# Interpolation
I18n.translate("mailer.welcome", :default => "Welcome, %{name}!", :name =>

See the I18n documentation documentation for more examples.


Blurbs start out as draft copy, and won't be displayed in production environments until they're published. If you want to publish all draft copy when deploying to production, you can use the copycopter:deploy rake task:

rake copycopter:deploy



Copycopter Client is maintained and funded by thoughtbot, inc

The names and logos for thoughtbot are trademarks of thoughtbot, inc.


Copycopter Client is Copyright © 2010-2011 thoughtbot. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.

Jump to Line
Something went wrong with that request. Please try again.