projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c33143
)
DataObjects/I18n.php
author
Alan Knowles
<alan@roojs.com>
Mon, 14 May 2018 07:35:58 +0000
(15:35 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 14 May 2018 07:35:58 +0000
(15:35 +0800)
DataObjects/I18n.php
patch
|
blob
|
history
diff --git
a/DataObjects/I18n.php
b/DataObjects/I18n.php
index
b3c1730
..
c7ea606
100644
(file)
--- a/
DataObjects/I18n.php
+++ b/
DataObjects/I18n.php
@@
-151,6
+151,23
@@
class Pman_Core_DataObjects_I18n extends DB_DataObject
}
}
+ function lookupCode($inlang,$ltype,$name)
+ {
+ $x = DB_DataObject::factory('i18n');
+ $x->ltype = $ltype;
+ $x->lval = $name;
+ $x->inlang= $inlang;
+
+ $x->limit(1);
+ if ($x->find(true) && !empty($x->lkey)) {
+ return $x->lkey;
+ }
+ return '';
+
+
+ }
+
+
function translate($inlang,$ltype,$kval)
{