Home » Internationalization » Translation2 » Bug #8547
Documentation is missing a column on "default db structure"
Details
| Submitted | 2006-08-23 21:08 UTC |
|---|---|
| From | clouserw at gmail dot com |
| Assigned | quipo |
| Status | Closed |
| Package | Translation2 |
| PHP Version | 4.3.9 |
| OS | Redhat |
| Roadmaps | (Not assigned) |
Comments
[2006-08-23 21:08 UTC] clouserw at gmail dot com
Description:
------------
Under the "Usage Example" on this page ( http://pear.php.net/manual/en/package.internationalization.translation2.intro.php ) it claims the default db structure is:
// NB: the default db structure is:
//
// Table "langs" (available languages and meta info)
// +----+------+------+------------+
// | ID | name | meta | error_text |
// +----+------+------+------------+
This is leaving out the `encoding` column which is required or some functions will fail with a fatal error.
Test script:
---------------
<?php
$this->translation =& Translation2::factory('DB', $dsn);
$this->translation->setLang('de');
$this->translation->getLang('de'); // error here
?>
Expected result:
----------------
Not a pear error.
Actual result:
--------------
A PEAR error with the following values:
[level] => 1024
[code] => -9
[message] => Translation2::getLang(): unknown language "en-US". Use Translation2::setLang() to set a default language.
the function fetchLangs() in /Translation2/Container/db.php requires there be an `encoding` column.