diff --git a/libraries/php-gettext/gettext.inc b/libraries/php-gettext/gettext.inc index 1c8a2fcb6..3edd42e7e 100644 --- a/libraries/php-gettext/gettext.inc +++ b/libraries/php-gettext/gettext.inc @@ -259,6 +259,17 @@ function _gettext($msgid) { function __($msgid) { return _gettext($msgid); } +/** + * Gettext with context. + */ +function _pgettext($msgctx, $msgid) { + $ret = _gettext($msgctx . "\004" . $msgid); + if (strpos($ret, "\004") !== FALSE) { + return $msgid; + } else { + return $ret; + } +} /** * Plural version of gettext. */