function applyFilters($q, $au)
{
- DB_DataObject::debugLevel(1);
+ //DB_DataObject::debugLevel(1);
if (!empty($q['query']['_with_en'])) {
$this->buildDB(); // ensure we have the full database...
require_once 'I18Nv2/Language.php';
$c = new I18Nv2_Language('en');
$ret = array_keys($c->codes); // we need to make sure these are lowercase!!!
- print_r($cfg['add_l']);exit;
-// $tolang = explode('_', $cfg['add_l']);
-// $tolang[0] = strtolower($tolang[0]);
+ foreach ($cfg['add_l'] as $k=>$v){
+ $tolang = explode('_', $k);
+ $tolang[0] = strtolower($tolang[0]);
+ $tolang = implode('_', $tolang);
+ $cfg['add_l'][$tolang] = $v;
+ unset($cfg['add_l'][$k]);
+ }
if (!empty($cfg['add_l'])) {
$ret = array_merge($ret, array_keys($cfg['add_l']));
}
foreach ($ret as $k=>$v) {
$ret[$k] = ($t=='l') ? $ret[$k] : strtoupper($v);
- if($t=='l') echo '<PRE>'.print_r($ret);
}
return $ret;
if (in_array($lkey, $complete)) {
continue;
}
+ if (empty($lkey)) { // not sure why we get empty values here.
+ continue;
+ }
$x = DB_DataObject::factory('I18n');
$x->ltype = $ltype;
$x->lkey = $lkey;
if ($type == 'l') {
$tolang = explode('_', $k);
- $tolang[0] = strtolower($tolang[0]);
- print_r($tolang);
+
$ret = $cache[$lang][$type]->getName($tolang[0]);
if (count($tolang) > 1) {
$ret.= '('.$tolang[1].')';