a simple Rails I18n backend using MongoDB
Add this line to your application's Gemfile:
gem 'i18n-mongodb'
And then execute:
$ bundle
Or install it yourself as:
$ gem install i18n-mongodb
Create an initializer config/initializers/i18n_backend.rb
and copy/adjust the code below:
require 'i18n/backend/mongodb'
session = Moped::Session.new(["127.0.0.1:27017"]).use(:i18n)
collection = session[:translations]
I18n.backend = I18n::Backend::Mongodb.new(collection)
- Fork it ( http://github.com/zekus/i18n-mongodb/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request