Skip to content
forked from yar/i18n_db

Database powered backend for Rails-2.2 i18n

Notifications You must be signed in to change notification settings

rubysolo/i18n_db

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Database-driven namespaced translations for Rails

This is a Rails-2.2+ i18n plugin written with a specific set of features in mind:

  • Only strings (with macro substitutions) are translated. E.g. everything that one would write directly in the view templates for a monolingual site, plus error messages etc.

  • Fallback to the primary language when a translation is missing.

  • Missing translations are tracked in the database.

  • Namespaces.

  • No support for model translations (like product names) at this stage. Feel free to add!

  • No support for pluralization initially.

  • Memcached for speed.

Each translated string can also be seen as an ActiveRecord instance, enabling easier construction of a web interface for translators (see i18n_db_admin). Deeply nested namespaces are supported and encouraged; otherwise, as we all know, the collection of translated phrases would turn into unmaintainable mess very quickly.

After loading, the translated strings are cached with standard Rails mechanisms and the default Simple Internationalization backend takes over and displays them.

Based on the code of globalize (for Rails 2.0) and i18n_yaml.

Please see i18n_db_admin for usage example.

About

Database powered backend for Rails-2.2 i18n

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published