PEAR is archived and read-only

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

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