Home » Internationalization » Translation2 » Bug #2508
Cant change options after calling Translation2::factory()
Details
| Request #2508 | Cant change options after calling Translation2::factory() |
|---|---|
| Submitted | 2004-10-11 20:43 UTC |
| From | tobias dot eberle at gmx dot de |
| Assigned | quipo |
| Status | Closed |
| Package | Translation2 |
| PHP Version | 4.3.9 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[2004-10-11 20:43 UTC] tobias dot eberle at gmx dot de
Description:
------------
Hallo,
I can set for example "strings_tables" while constructing Translation2 with factory(). But I cant change it later.
The workaround shown in the reproduce code is quite not acceptable because _parseOptions() is a private method (storage is not classified).
It would be nice if you can implement a method allowing to set options later.
Bye, Tobias
Reproduce code:
---------------
$aParams = array('strings_tables' => array('en' => 'translation_en'));
$cTranslation2 = Translation2::factory('DB', $sDsn, $aParams);
//add german language
$aParams['strings_tables']['de'] = 'translation_de';
//workaround to set strings_tables after calling factory()
$cTranslation2->storage->_parseOptions(
array('strings_tables' =>$aParams));