'add_l'=> array(), // key -> value additional languages...
'add_c'=> array(), // additional countries...(eg. '-R' => 'Regional' )
'add_m'=> array(), // additional currencies...
+ 'add_p'=> array(), // additional currencies...
);
if (!empty($q['_filtered']) && !empty($this->ltype)) {
$cfg = $this->cfg();
- print_r($cfg);exit;
$filter = $cfg[$this->ltype];
-
- $this->whereAddIn('lkey', $filter, 'string');
-
+ if(is_array($filter)){
+ $this->whereAddIn('lkey', $filter, 'string');
+ }
}
}
}
$ret[] = '**';
break;
+ case 't':
+ require_once 'I18Nv2/PhonePrefix.php';
+ $c = new I18Nv2_PhonePrefix('en');
+ $ret = array_keys($c->codes);
+ if (!empty($cfg['add_t'])) {
+ $ret = array_merge($ret, array_keys($cfg['add_m']));
+ }
+ $ret[] = '**';
+ break;
}
{
$cfg = $this->cfg();
- //print_r($cfg);
if ($ltype === false) {
// trigger all builds.
//DB_DataObject::debugLevel(1);
$this->buildDB('c');
$this->buildDB('l');
$this->buildDB('m');
+ $this->buildDB('t');
return;
}
require_once 'I18Nv2/Country.php';
require_once 'I18Nv2/Language.php';
require_once 'I18Nv2/Currency.php';
+ require_once 'I18Nv2/PhonePrefix.php';
$cache[$lang] = array(
'l' => new I18Nv2_Language($lang, 'UTF-8'),
'c' => new I18Nv2_Country($lang, 'UTF-8'),
- 'm' => new I18Nv2_Currency($lang, 'UTF-8')
+ 'm' => new I18Nv2_Currency($lang, 'UTF-8'),
+ 't' => new I18Nv2_PhonePrefix($lang, 'UTF-8')
);
//echo '<PRE>';print_r(array($lang, $cache[$lang]['c']));
}