<?php
/// provide language data!!!
-// THIS IS PUBLICALLY ACCESSABLE..
+// DEPRECIATED - moved to Pman_I18N
/**
*
- * Either we load this as a standard array at start??
- * eg. after login...
- *
- * or we treat it like a regular pulldown... - on demand...
- *
- * big snag is that we can not include these until the user has specified their interface language.
- *
- * If we do a global jS array?
- * Pman.Lang.en = [ 'en' , 'English']
- *
- * If we do a standard 'store' version..
- * { total: x, data [ { code: 'en', title: 'English' }] }
- *
- *
- * usage:
- *
- * index.php/Pman/I18N/BuildDB -- buildes the database..
- *
- *
- * Config in index.php..
- *
- * 'Pman_I18N' => array(
- 'l' => array(
- 'en', 'zh_CN', 'zh_HK', 'zh_TW', 'th', 'ko', 'ja', 'ms',
- 'id', // indonesian
- 'tl', // tagalog
- 'vi', //vietnamise
- 'hi', // hindi
- 'ta', // tamil
- '**', // other
- ),
- 'c' => '*',
- 'm' => array( 'USD', 'HKD', 'GBP', 'CNY', 'SGD', 'JPY' )
- ),
-
*
*/
-require_once 'Pman.php';
-class Pman_I18N extends Pman
+require_once 'Pman/Core/I18n.php';
+class Pman_I18N extends Pman_Core_I18n
{
// these are the languages we support.
case 'Currency':
$ret = $this->getList('m', $lbits[0],empty($_REQUEST['filter']) ? false : $_REQUEST['filter']);
break;
-
+ // part of parent!!!!
+ /*
case 'BuildDB':
// by admin only?!?
//DB_DataObject::debugLevel(1);
$this->buildDb('m');
die("DONE!");
break;
-
+ */
default:
$this->jerr("ERROR");
}
}
-
-
- function buildDB($ltype= false, $inlang= false )
- {
- if ($ltype === false) {
-
- die("OOPS NO LTYPE");
- }
- if ($inlang == '**') {
- return; // dont bother building generic..
- }
- if ($inlang === false) {
- foreach( $this->cfg['l'] as $l) {
- $this->buildDB($ltype, $l);
- }
- return;
- }
-
- $list = $this->getDefaultCfg($ltype); //$this->cfg[$ltype];
-
- //DB_DataObject::debugLevel(1);
-
- foreach($list as $lkey) {
- $x = DB_DataObject::factory('i18n');
- $x->ltype = $ltype;
- $x->lkey = $lkey;
- $x->inlang= $inlang;
- if ($x->find(true)) {
- $xx= clone($x);
- $x->lval = $this->translate($inlang, $ltype, $lkey);
- $x->update($xx);
- continue;
- }
- $x->lval = $this->translate($inlang, $ltype, $lkey);
- $x->insert();
-
- }
-
-
-
-
- }
+
}