X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=I18n.php;h=101cdda404c2ced67fd8f376d4ab771e6705ce06;hp=af327e4c6e31eb1af746398e6b5cc5475111995e;hb=0892bd2a238509a1a984007cf85c9197ec7e7cba;hpb=e7b803fe831c1b061401b2867a18dfaa2d58ca29 diff --git a/I18n.php b/I18n.php index af327e4c..101cdda4 100644 --- a/I18n.php +++ b/I18n.php @@ -120,7 +120,7 @@ class Pman_Core_I18n extends Pman $i = DB_DataObject::Factory('I18n'); - + $i->is_active = 1; switch($s) { case 'Lang': @@ -189,7 +189,8 @@ class Pman_Core_I18n extends Pman foreach($langs as $lang) { //$rlang = array_shift(explode('_', strtoupper($lang))); - $rlang = array_shift(explode('_', $lang)); + $ll = explode('_', $lang); + $rlang = array_shift($ll); $ar[$lang] = array(); $i = DB_DataObject::Factory('I18n'); @@ -199,6 +200,10 @@ class Pman_Core_I18n extends Pman $i = DB_DataObject::Factory('I18n'); $ar[$lang]['m'] = $i->toTransList('m', $rlang); } + require_once 'I18Nv2/CurrencyMap.php'; + + $ar['currency_map'] = I18Nv2_CurrencyMap::$s_map; + //echo '
';print_r($ar);
         header('Content-type: text/javascript');
         echo "Roo.namespace('Pman.I18n');";
@@ -230,7 +235,7 @@ class Pman_Core_I18n extends Pman
         if (empty($k)) {
             return '??';
         }
-        $lang = !$au || empty($au->lang ) ? 'en' : is_string($au) ? $au : $au->lang;
+        $lang = !$au || empty($au->lang ) ? 'en' : (is_string($au) ? $au : $au->lang);
         
         // does it need caching?