Translations.php
authorAlan Knowles <alan@roojs.com>
Fri, 16 Aug 2013 05:45:57 +0000 (13:45 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 16 Aug 2013 05:45:57 +0000 (13:45 +0800)
Translations.php

index 5a15992..7abf180 100644 (file)
@@ -41,8 +41,24 @@ class Pman_Admin_Translations extends Pman
     }
     
     
-    function get()
+    function get($path)
     {
+        
+        if (!empty($path)) {
+            // output the translations strings file..
+            list($module, $lang) = explode('/',$path);
+                
+            $this->loadOriginalStrings($module);
+            
+            $data = $this->loadTranslateDB($lang,$module);
+            
+            $j = new Services_JSON();
+    
+            echo $j->stringify($data, null, 4);
+            exit;
+            
+        }
+        
         // load and parse json file containing all translations...
         if (isset($_REQUEST['id'])) {
             return $this->post();
@@ -312,6 +328,6 @@ class Pman_Admin_Translations extends Pman
         //$this->writeTrans($lang);
     }
      
-    
+     
     
 }
\ No newline at end of file