Module: I18n::Backend::Simple::Implementation

Included in:
I18n::Backend::Simple
Defined in:
lib/exvo_globalize/backend/simple.rb

Instance Method Summary collapse

Instance Method Details

#available_translationsObject

Extend the Simple backend with a custom ‘available_translations` method returning a combined hash with all translations from this backend



8
9
10
11
12
13
14
15
# File 'lib/exvo_globalize/backend/simple.rb', line 8

def available_translations
  # simple backend is lazy loaded (woken up by first I18n.t() call)
  # wake it up if it's still sleeping
  send(:init_translations) unless initialized?

  # nested Hash with all translations
  send(:translations)
end