instance method
resolve_link
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
resolve_link(locale, key)
No documentation comment.
Parameters
-
localereq -
keyreq
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/flatten.rb, line 88
def resolve_link(locale, key)
key, locale = key.to_s, locale.to_sym
links = self.links[locale]
if links.key?(key)
links[key]
elsif link = find_link(locale, key)
store_link(locale, key, key.gsub(*link))
else
key
end
end
Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/flatten.rb line 88
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Backend::Flatten