PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Internationalization » Translation2 » Bug #4476

GetText !_native not works without gettext extension

Details

Submitted2005-05-30 12:05 UTC
Fromsergey at pushok dot com
Assignedquipo
StatusClosed
PackageTranslation2
PHP Version4.3.11
Roadmaps(Not assigned)

Comments

[2005-05-30 12:05 UTC] sergey at pushok dot com

Description:
------------
Some time while ago I contribute some code to work with PO gettext files directly. I get latest version, where this fix included and found that without PHP gettext extension it not works. This is because the code below:
foreach ((array) $this->_domains as $domain => $path) {
bindtextdomain($domain, $path);
}
I.e. function bindtextdomain called even it is not needed and not exist (PHP gettext not installed). This code bellow fixes this:
if ($this->_native)
{
foreach ((array) $this->_domains as $domain => $path) {
bindtextdomain($domain, $path);
}
}