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 #5170

setLang will not work

Details

Submitted2005-08-21 19:48 UTC
Frommichael at klink dot ws
Assignedquipo
StatusBogus
PackageTranslation2
PHP Version5.0.5
OSwin xp
Roadmaps(Not assigned)

Comments

[2005-08-21 19:48 UTC] michael at klink dot ws

Description:
------------
setLang() sets no language.

Test script:
---------------
final public function _translation() {
$this -> _connection -> setLang('de');
$this -> _connection -> setPageID($this -> _goup);
$this -> _connection =& $this -> _connection -> getDecorator("Lang");
$this -> _connection -> setOption("fallbackLang", "de");
$this -> _connection =& $this -> _connection -> getDecorator("Lang");
$this -> _connection -> setOption("fallbackLang", "en");
foreach($this -> _connection -> getLangs() as $key => $value) {
$this -> _connection =& $this -> _connection -> getDecorator("Lang");
$this -> _connection -> setOption("fallbackLang", $key);
}
if(is_array($this -> _translation)) {
$this -> _connection -> setParams($this -> _translation);
$this -> _connection = $this -> _connection -> get($this -> _translation[0]);
}
else {
$this -> _connection = $this -> _connection -> get($this -> _translation);

}
}

Actual result:
--------------
Warning: No valid language set. Use Translation2::setLang(). in D:\SERVER\Projekte\pear\PEAR.php on line 762