I\'m guessing that rails stores all the parsed translations yml files in a sort of array/hash. Is there a way to access this?
For example, if I\'ve a file:
If you are using I18n::Fallbacks unfortunately you can't use I18n.t('.') as it just returns the contents current locale (eg. 'en-GB') and nothing from any of the fallback locales (eg 'en'). To get round this you can iterate over the fallbacks and use deep_merge! to combine them.
module I18n
class << self
def all
fallbacks[I18n.locale].reverse.reduce({}) do |translations, fallback|
translations.deep_merge!(backend.translate(fallback, '.'))
end
end
end
end