PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Internationalization » Translation2 » Bug #8547

Documentation is missing a column on "default db structure"

Details

Submitted2006-08-23 21:08 UTC
Fromclouserw at gmail dot com
Assignedquipo
StatusClosed
PackageTranslation2
PHP Version4.3.9
OSRedhat
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.