Methods
L
Instance Public methods
lookup(locale, key, scope = [], options = {})
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/cascade.rb, line 37
def lookup(locale, key, scope = [], options = {})
  return super unless cascade = options[:cascade]
  separator = options[:separator] || I18n.default_separator
  skip_root = cascade.has_key?(:skip_root) ? cascade[:skip_root] : true
  step      = cascade[:step]
  keys   = I18n.normalize_keys(nil, key, nil, separator)
  offset = options[:cascade][:offset] || keys.length
  scope  = I18n.normalize_keys(nil, nil, scope, separator) + keys
  key    = scope.slice!(-offset, offset).join(separator)
  begin
    result = super
    return result unless result.nil?
  end while !scope.empty? && scope.slice!(-step, step) && (!scope.empty? || !skip_root)
end