projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
21157ba
)
I18n.php
author
Alan Knowles
<alan@akbkhome.com>
Tue, 20 Jul 2010 03:38:07 +0000
(11:38 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Tue, 20 Jul 2010 03:38:07 +0000
(11:38 +0800)
I18n.php
patch
|
blob
|
history
diff --git
a/I18n.php
b/I18n.php
index
235781e
..
5a49205
100644
(file)
--- a/
I18n.php
+++ b/
I18n.php
@@
-186,9
+186,9
@@
class Pman_Core_i18N extends Pman
$lang = array_shift(explode('_', strtoupper($lang)));
$ar[$lang] = array(
$lang = array_shift(explode('_', strtoupper($lang)));
$ar[$lang] = array(
- 'l' => $this->objToList(new I18Nv2_Language($lang, 'UTF-8')),
- 'c' => $this->objToList(new I18Nv2_Country($lang, 'UTF-8')),
- 'm' => $this->objToList(new I18Nv2_Currency($lang, 'UTF-8'))
+ 'l' => $this->objToList(
'l',
new I18Nv2_Language($lang, 'UTF-8')),
+ 'c' => $this->objToList(
'c',
new I18Nv2_Country($lang, 'UTF-8')),
+ 'm' => $this->objToList(
'm',
new I18Nv2_Currency($lang, 'UTF-8'))
);
}
header('Content-type: text/javascript');
);
}
header('Content-type: text/javascript');
@@
-198,12
+198,12
@@
class Pman_Core_i18N extends Pman
}
}
- function objToList($obj) {
+ function objToList($
type, $
obj) {
$ret = array();
foreach($obj->codes as $k=>$v) {
$ret[] = array(
$ret = array();
foreach($obj->codes as $k=>$v) {
$ret[] = array(
- 'code'=> $
k
,
+ 'code'=> $
type == 'c' ? $k : strtolower($v)
,
'title' => $v
);
}
'title' => $v
);
}