Home » Internationalization » Translation2 » Bug #4476
GetText !_native not works without gettext extension
Details
| Submitted | 2005-05-30 12:05 UTC |
|---|---|
| From | sergey at pushok dot com |
| Assigned | quipo |
| Status | Closed |
| Package | Translation2 |
| PHP Version | 4.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);
}
}