Class: FastGettext::TranslationRepository::Mo

Inherits:
Base
  • Object
show all
Defined in:
lib/fast_gettext/translation_repository/mo.rb

Overview

  • find and store mo files

  • provide access to translations in mo files

Direct Known Subclasses

Po

Instance Method Summary collapse

Methods inherited from Base

#[], #plural

Constructor Details

#initialize(name, options = {}) ⇒ Mo

Returns a new instance of Mo.



8
9
10
11
# File 'lib/fast_gettext/translation_repository/mo.rb', line 8

def initialize(name,options={})
  find_and_store_files(name,options)
  super
end

Instance Method Details

#available_localesObject



13
14
15
# File 'lib/fast_gettext/translation_repository/mo.rb', line 13

def available_locales
  @files.keys
end

#pluralisation_ruleObject



17
18
19
# File 'lib/fast_gettext/translation_repository/mo.rb', line 17

def pluralisation_rule
  current_translations.pluralisation_rule
end