instance method
nsgettext
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
nsgettext(msgid, msgid_plural, n = 1, separator = '|')
Method signatures:
nsgettext('Fruits|apple', 'apples', 2) nsgettext(['Fruits|apple', 'apples'], 2)
Parameters
-
msgidreq -
msgid_pluralreq -
nopt = 1 -
separatoropt = '|'
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/gettext/helpers.rb, line 36
def nsgettext(msgid, msgid_plural, n = 1, separator = '|')
if msgid.is_a?(Array)
msgid, msgid_plural, n, separator = msgid[0], msgid[1], msgid_plural, n
separator = '|' unless separator.is_a?(::String)
end
scope, msgid = I18n::Gettext.extract_scope(msgid, separator)
default = { :one => msgid, :other => msgid_plural }
I18n.t(msgid, :default => default, :count => n, :scope => scope, :separator => separator)
end
Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/gettext/helpers.rb line 36
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Gettext::Helpers