Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 1.33 KB

README.rdoc

File metadata and controls

19 lines (13 loc) · 1.33 KB

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.