Method: GetText#pgettext
- Defined in:
- lib/gettext.rb
#pgettext(msgctxt, msgid) ⇒ Object Also known as: p_
call-seq:
pgettext(msgctxt, msgid)
p_(msgctxt, msgid)
Translates msgid with msgctxt. This methods is similer with s_().
e.g.) p_("File", "New") == s_("File|New")
p_("File", "Open") == s_("File|Open")
-
msgctxt: the message context.
-
msgid: the message id.
-
Returns: the localized text by msgid. If there are no localized text, it returns msgid.
See: www.gnu.org/software/autoconf/manual/gettext/Contexts.html
163 164 165 |
# File 'lib/gettext.rb', line 163 def pgettext(msgctxt, msgid) TextDomainManager.(self, "#{msgctxt}\004#{msgid}", "\004") end |