Module: Loaf::Translation
Instance Method Summary collapse
-
#find_title(title, options = {}) ⇒ Object
Translate breadcrumb title.
-
#translation_scope ⇒ Object
Returns translation lookup.
Instance Method Details
#find_title(title, options = {}) ⇒ Object
Translate breadcrumb title
22 23 24 25 26 27 |
# File 'lib/loaf/translation.rb', line 22 def find_title(title, = {}) [:scope] ||= translation_scope [:default] = Array([:default]) [:default] << title if [:default].empty? I18n.t("#{title}", ) end |
#translation_scope ⇒ Object
Returns translation lookup
8 9 10 |
# File 'lib/loaf/translation.rb', line 8 def translation_scope "loaf.breadcrumbs" end |