Module: FastGettext
- Extended by:
- FastGettext
- Includes:
- Storage
- Included in:
- FastGettext
- Defined in:
- lib/fast_gettext/vendor/iconv.rb,
lib/fast_gettext.rb,
lib/fast_gettext/cache.rb,
lib/fast_gettext/mo_file.rb,
lib/fast_gettext/po_file.rb,
lib/fast_gettext/storage.rb,
lib/fast_gettext/version.rb,
lib/fast_gettext/translation.rb,
lib/fast_gettext/vendor/mofile.rb,
lib/fast_gettext/vendor/poparser.rb,
lib/fast_gettext/translation_repository.rb,
lib/fast_gettext/translation_repository/db.rb,
lib/fast_gettext/translation_repository/mo.rb,
lib/fast_gettext/translation_repository/po.rb,
lib/fast_gettext/translation_repository/base.rb,
lib/fast_gettext/translation_repository/yaml.rb,
lib/fast_gettext/translation_repository/chain.rb,
lib/fast_gettext/translation_repository/merge.rb,
lib/fast_gettext/translation_repository/logger.rb
Overview
Modifications wrapped inside FastGettext namespace to reduce conflic
Defined Under Namespace
Modules: GetText, Storage, Translation, TranslationMultidomain, TranslationRepository Classes: Cache, MoFile, PoFile
Constant Summary collapse
- LOCALE_REX =
/^[a-z]{2,3}$|^[a-z]{2,3}_[A-Z]{2,3}$/
- NAMESPACE_SEPARATOR =
'|'
- VERSION =
Version = '1.4.1'
Instance Method Summary collapse
- #add_text_domain(name, options) ⇒ Object
-
#locale_path ⇒ Object
some repositories know where to store their locales.
Methods included from Storage
#available_locales, #best_locale_in, #cache, #cached_find, #cached_plural_find, #current_repository, #default_locale, #default_locale=, #expire_cache_for, #key_exist?, #locale, #locale=, #pluralisation_rule, #reload!, #set_locale, #silence_errors, #text_domain, #translation_repositories, #with_locale
Instance Method Details
#add_text_domain(name, options) ⇒ Object
27 28 29 |
# File 'lib/fast_gettext.rb', line 27 def add_text_domain(name,) translation_repositories[name] = TranslationRepository.build(name,) end |
#locale_path ⇒ Object
some repositories know where to store their locales
32 33 34 |
# File 'lib/fast_gettext.rb', line 32 def locale_path translation_repositories[text_domain].instance_variable_get(:@options)[:path] end |