# File lib/i18n/backend/chain.rb, line 35 35: def available_locales 36: backends.map { |backend| backend.available_locales }.flatten.uniq 37: end
# File lib/i18n/backend/chain.rb, line 60 60: def localize(locale, object, format = :default, options = {}) 61: backends.each do |backend| 62: catch(:exception) do 63: result = backend.localize(locale, object, format, options) and return result 64: end 65: end 66: throw(:exception, I18n::MissingTranslation.new(locale, format, options)) 67: end
# File lib/i18n/backend/chain.rb, line 27 27: def reload! 28: backends.each { |backend| backend.reload! } 29: end
# File lib/i18n/backend/chain.rb, line 31 31: def store_translations(locale, data, options = {}) 32: backends.first.store_translations(locale, data, options) 33: end
# File lib/i18n/backend/chain.rb, line 39 39: def translate(locale, key, default_options = {}) 40: namespace = nil 41: options = default_options.except(:default) 42: 43: backends.each do |backend| 44: catch(:exception) do 45: options = default_options if backend == backends.last 46: translation = backend.translate(locale, key, options) 47: if namespace_lookup?(translation, options) 48: namespace ||= {} 49: namespace.merge!(translation) 50: elsif !translation.nil? 51: return translation 52: end 53: end 54: end 55: 56: return namespace if namespace 57: throw(:exception, I18n::MissingTranslation.new(locale, key, options)) 58: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.