Array
# File lib/locale_rails/action_view.rb, line 17 17: def _find_template_internal(file_name, format, html_fallback = false) 18: begin 19: return find_template_without_locale_rails(file_name, format, html_fallback) 20: rescue MissingTemplate => e 21: end 22: nil 23: end
# File lib/locale_rails/action_view.rb, line 25 25: def find_template_with_locale_rails(original_template_path, format = nil, html_fallback = true) 26: return original_template_path if original_template_path.respond_to?(:render) 27: 28: path = original_template_path.sub(/^\//, '') 29: if m = path.match(/(.*)\.(\w+)$/) 30: template_file_name, template_file_extension = m[1], m[2] 31: else 32: template_file_name = path 33: end 34: 35: default = Locale.default.to_common 36: Locale.candidates.each do |v| 37: file_name = "#{template_file_name}_#{v}" 38: ret = _find_template_internal(file_name, format) 39: return ret if ret 40: if v == default 41: # When the user locale is the default locale, find no locale file such as index.html.erb. 42: ret = _find_template_internal(template_file_name, format) 43: end 44: return ret if ret 45: end 46: find_template_without_locale_rails(original_template_path, format, html_fallback) 47: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.