A small database backend for Rails I18n
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
controllers
generators/translation_table
lib
tasks
test
views
.gitignore
README.textile
Rakefile
init.rb
install.rb
uninstall.rb

README.textile

Klein

Description

Klein is a lightweight Rails I18n database backend.

Setup

Installation

script/plugin install git@github.com:thomaskay/klein.git

Setup migrations

Create and run migrations with:

rake klein:setup
rake db:migrate

Import existing translations from yaml files
rake klein:import yaml_file='tmp/da.yml'

Define backend

And add the following to your environment:

I18n.backend = I18n::Backend::KleinBackend.new  
I18n.default_locale = :en

Interface

The interface can be enabled by adding the following to your routes:

map.klein

The interface is protected with basic authentication.

Things to do

  • Making it possible to override the authentication filter used.
  • Making it easier to add a new locale.