3 * Table Definition for i18n
5 * This is heavily related to the Pman_I18n implementation..
7 * It should eventually replace most of that..
10 require_once 'DB/DataObject.php';
12 class Pman_Core_DataObjects_I18n extends DB_DataObject
15 /* the code below is auto generated do not remove the above tag */
17 public $__table = 'i18n'; // table name
18 public $id; // int(11) not_null primary_key auto_increment
19 public $ltype; // string(1) not_null multiple_key
20 public $lkey; // string(8) not_null
21 public $inlang; // string(8) not_null
22 public $lval; // string(64) not_null
25 /* the code above is auto generated do not remove the tag below */
28 static $cfg; // the default configuration.
30 function applyFilters($q, $au)
33 //DB_DataObject::debugLevel(1);
34 if (!empty($q['query']['_with_en'])) {
36 i18n_translate(ltype, lkey, 'en') as lval_en
42 function loadDefault()
49 function buildDB($ltype= false, $inlang= false )
51 if ($ltype === false) {
54 if ($inlang == '**') {
55 return; // dont bother building generic..
59 if ($inlang === false) {
60 foreach( $this->cfg['t'] as $l) {
61 $this->buildDB($ltype, $l);
66 $list = $this->getDefaultCfg($ltype);
68 DB_DataObject::debugLevel(1);
70 foreach($list as $lkey) {
71 $x = DB_DataObject::factory('i18n');
77 $x->lval = $this->translate($inlang, $ltype, $lkey);
81 $x->lval = $this->translate($inlang, $ltype, $lkey);