// languages available
'l' => array(
- 'en', 'zh_CN', 'zh_HK', 'zh_TW', 'th', 'ko', 'ja', 'ms',
- 'id', // indonesian
- 'tl', // tagalog
- 'vi', //vietnamise
- 'hi', // hindi
- 'ta', // tamil
- '**', // other
+ 'en', 'zh_CN', 'zh_HK', 'zh_TW', //'th', 'ko', 'ja', 'ms',
+ //'id', // indonesian
+ // 'tl', // tagalog
+ // 'vi', //vietnamise
+ // 'hi', // hindi
+ // 'ta', // tamil
+ // '**', // other
),
'c' => array(
'AU', 'CN', 'HK', 'IN', 'ID', 'JP', 'MY', 'NZ', 'TW', 'SG', 'TH', 'KR', 'US', 'PH', 'VN','**'
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!!!
-
+ 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']));
}
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);
- print_r($tolang);
+
$ret = $cache[$lang][$type]->getName($tolang[0]);
if (count($tolang) > 1) {
$ret.= '('.$tolang[1].')';