class method self.normalize_translation_keys

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

self.normalize_translation_keys(locale, key, scope)

Merges the given locale, key and scope into a single array of keys. Splits keys that contain dots into multiple keys. Makes sure all keys are Symbols.

Parameters

locale req
key req
scope req
Source
# File activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.rb, line 188
    def normalize_translation_keys(locale, key, scope)
      keys = [locale] + Array(scope) + [key]
      keys = keys.map { |k| k.to_s.split(/\./) }
      keys.flatten.map { |k| k.to_sym }
    end

Defined in activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.rb line 188 · View on GitHub · Improve this page · Find usages on GitHub

Defined in I18n

Type at least 2 characters to search.

↑↓ navigate · open · esc close