//}
$this->authUser = $au;
- $opts = PEAR::getStaticProperty('Pman_Core_I18N', 'options');
- if (empty($opts)) {
- $opts = PEAR::getStaticProperty('Pman_I18N', 'options');
- }
- $opts = empty($opts) ? array() : $opts;
+ $ff= HTML_FlexyFramework::get();
+
+
+ $opts = empty($ff->Pman_Core_I18N) ? (empty($ff->Pman_I18N) ? array() : $ff->Pman_I18N) : $ff->Pman_Core_I18N;
+
// load the cofiguration
foreach($opts as $k=>$v) {
- if ($v == '*') {
+ if ($v == '*') { // everything..
$this->cfg[$k] = $this->getDefaultCfg($k);
continue;
}
case 'BuildDB':
// by admin only?!?
//DB_DataObject::debugLevel(1);
- $this->buildDb('l');
- $this->buildDb('c');
- $this->buildDb('m');
+ $i = DB_DataObject::Factory('I18n');
+ $i->buildDb();
die("DONE!");
break;
}
function objToList($type, $obj) {
$ret = array();
- print_r($this->cfg);
+
foreach($this->cfg[$type] as $k) {
$sub = false;
+
if (strpos($k, '_') !== false) {
$bits = explode('_', $k);
$k = array_shift($bits);
}
$ret[] = array(
- 'code'=> $type=='l' ? strtolower($k) : strtoupper($k),
+ 'code'=> ($type=='l' ? strtolower($k) : strtoupper($k)) . ($sub ? '_'.strtoupper($sub) : ''),
'title' => $v
);
}