CUPS サーバーでこの php クラスを使用しようとしています。
このクラスから関数を呼び出そうとすると、
Fatal error: Call to undefined function _() in /usr/local/share/php/printipp/BasicIPP.php on line 344
344 行目 次のようになります。
self::_putDebug(sprintf(_("Charset: %s") , $charset) , 2);
次の関数内:
public function setCharset($charset = 'us-ascii')
{
$charset = strtolower($charset);
$this->charset = $charset;
$this->meta->charset = chr(0x47) // charset type | value-tag
. chr(0x00) . chr(0x12) // name-length
. "attributes-charset" // attributes-charset | name
. self::_giveMeStringLength($charset) // value-length
. $charset; // value
self::_putDebug(sprintf(_("Charset: %s") , $charset) , 2);
$this->setup->charset = 1;
}
私の PHP バージョンは 5.3.26 です。_() 関数とは何ですか。
EDIT**
_() は gettext() のエイリアスのようです。
パッケージマネージャーで確認した後、0.17 バージョンの Gettext がインストールされています。
PHPで有効にするにはどうすればよいですか?