instance method
npgettext
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
npgettext(msgctxt, msgid, msgid_plural, n = 1)
Method signatures:
npgettext('Fruits', 'apple', 'apples', 2) npgettext('Fruits', ['apple', 'apples'], 2)
Parameters
-
msgctxtreq -
msgidreq -
msgid_pluralreq -
nopt = 1
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/gettext/helpers.rb, line 51
def npgettext(msgctxt, msgid, msgid_plural, n = 1)
separator = I18n::Gettext::CONTEXT_SEPARATOR
if msgid.is_a?(Array)
msgid_plural, msgid, n = msgid[1], [msgctxt, msgid[0]].join(separator), msgid_plural
else
msgid = [msgctxt, msgid].join(separator)
end
nsgettext(msgid, msgid_plural, n, separator)
end
Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/gettext/helpers.rb line 51
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Gettext::Helpers