Module: I18n
- Defined in:
- lib/i18n/backend/sequel/missing.rb,
lib/i18n/backend/sequel.rb,
lib/i18n/backend/sequel/store_procs.rb,
lib/i18n/backend/sequel/translation.rb
Overview
This extension stores translation stub records for missing translations to
the database.
This is useful if you have a web based translation tool. It will populate
the database with untranslated keys as the application is being used. A
translator can then go through these and add missing translations.
Example usage:
I18n::Backend::Chain.send(:include, I18n::Backend::Sequel::Missing)
I18n.backend = I18n::Backend::Chain.new(I18n::Backend::Sequel.new, I18n::Backend::Simple.new)
Stub records for pluralizations will also be created for each key defined
in i18n.plural.keys.
For example:
# en.yml
en:
i18n:
plural:
keys: [:zero, :one, :other]
# pl.yml
pl:
i18n:
plural:
keys: [:zero, :one, :few, :other]
It will also persist interpolation keys in Translation#interpolations so
translators will be able to review and use them.
Defined Under Namespace
Modules: Backend