DataObjects/Core_notify.php
[Pman.Core] / I18n.php
index 6f51c4d..afd8950 100644 (file)
--- a/I18n.php
+++ b/I18n.php
@@ -93,11 +93,11 @@ class Pman_Core_i18N extends Pman
         //}
         $this->authUser = $au;
         
-        $opts = PEAR::getStaticProperty('Pman_Core_I18N', 'options');
-        if (empty($opts)) {
-            $opts = PEAR::getStaticProperty('Pman_I18N', 'options');
-        }
-        $opts = empty($opts)  ?  array() : $opts;
+        $ff= HTML_FlexyFramework::get();
+        
+        
+        $opts = empty($ff->Pman_Core_I18N) ? (empty($ff->Pman_I18N) ? array() : $ff->Pman_I18N)  : $ff->Pman_Core_I18N;
+        
         
         // load the cofiguration
         foreach($opts as $k=>$v) {
@@ -195,7 +195,7 @@ class Pman_Core_i18N extends Pman
                 'm' => $this->objToList('m', new I18Nv2_Currency($rlang, 'UTF-8'))
             );
         }
-        echo '<PRE>';print_r($ar);
+        //echo '<PRE>';print_r($ar);
         header('Content-type: text/javascript');
         echo 'Pman.I18n.Data = ' .  json_encode($ar);
         exit;
@@ -205,11 +205,11 @@ class Pman_Core_i18N extends Pman
     }
     function objToList($type, $obj) {
         $ret = array();
-        
-        $country = new I18Nv2_Country($obj->language, 'UTF-8')
-        
+         
+         
         foreach($this->cfg[$type] as $k) {
             $sub = false;
+            
             if (strpos($k, '_') !== false) {
                 $bits = explode('_', $k);
                 $k = array_shift($bits);
@@ -218,11 +218,11 @@ class Pman_Core_i18N extends Pman
             $v = $k == '**' ? 'Other' : $obj->getName($k);
             
             if ($sub) {
-                $v .= ' ('. $country->getName($sub).')';
+                $v .= ' ('.$sub.')';
             }
             
             $ret[] = array(
-                'code'=>   $type=='l' ? strtolower($k) : strtoupper($k), 
+                'code'=>   ($type=='l' ? strtolower($k) : strtoupper($k)) . ($sub ? '_'.strtoupper($sub) : ''), 
                 'title' => $v
             );
         }