$ff= HTML_FlexyFramework::get();
- $opts = empty($ff->Pman_Core_I18N) ? (empty($ff->Pman_I18N) ? array() : $ff->Pman_I18N) : $ff->Pman_Core_I18N;
+ $opts = empty($ff->Pman_Core_I18N) ?
+ (empty($ff->Pman_I18N) ? array() : $ff->Pman_I18N)
+ : $ff->Pman_Core_I18N;
$i->ltype = 'l'; // string(1) not_null multiple_key
$i->lkey = $lang; // string(8) not_null
if (!$i->count()) {
+
+
$this->jerr('invalid lang configured: ' . $lang);
}
function get($s ='')
{
- $i = DB_DataObject::Factory('I18n');
- $i->buildDb();
+
$lbits = $this->guessUsersLanguage();
break;
case 'Country':
- $i->ltype = 'l';
+ $i->ltype = 'c';
$i->applyFilters($_REQUEST, $this->authUser, $this);
- $this->jdata($i->toTransList('l', $lbits[0]));
+ $this->jdata($i->toTransList('c', $lbits[0]));
$ret = $this->getList('c', $lbits[0],empty($_REQUEST['filter']) ? false : $_REQUEST['filter']);
break;
case 'Currency':
- $i->ltype = 'l';
+ $i->ltype = 'm';
$i->applyFilters($_REQUEST, $this->authUser, $this);
- $this->jdata($i->toTransList('l', $lbits[0]));
+ $this->jdata($i->toTransList('m', $lbits[0]));
break;
}
-
+
+ $i = DB_DataObject::Factory('I18n');
+ $i->buildDb();
$i = DB_DataObject::Factory('I18n');
{
$rlang = array_shift(explode('_', strtoupper($lang)));
- $ar[$lang] = array(
- 'l' => $i->toTransList('l', $rlang),
- 'c' => $i->toTransList('c', $rlang),
- 'm' => $i->toTransList('m', $rlang),
- );
+ $ar[$lang] = array();
+ $i = DB_DataObject::Factory('I18n');
+ $ar[$lang]['l'] = $i->toTransList('l', $rlang);
+ $i = DB_DataObject::Factory('I18n');
+ $ar[$lang]['c'] = $i->toTransList('c', $rlang);
+ $i = DB_DataObject::Factory('I18n');
+ $ar[$lang]['m'] = $i->toTransList('m', $rlang);
}
//echo '<PRE>';print_r($ar);
header('Content-type: text/javascript');