Class: ActionView::TemplateFinder
- Inherits:
-
Object
- Object
- ActionView::TemplateFinder
- Defined in:
- lib/gettext/rails.rb
Instance Method Summary collapse
Instance Method Details
#pick_template_with_gettext(template_path, extension) ⇒ Object
291 292 293 294 295 296 297 298 299 |
# File 'lib/gettext/rails.rb', line 291 def pick_template_with_gettext(template_path, extension) locale = GetText.locale [locale.to_general, locale.to_s, locale.language, Locale.default.language].uniq.each do |v| file_name = "#{template_path}_#{v}.#{extension}" base_path = find_base_path_for(file_name) return "#{base_path}/#{file_name}" unless base_path.blank? end pick_template_without_gettext(template_path, extension) end |