GoogleTranslate.php
authorChris <chris@roojs.com>
Wed, 2 Apr 2014 13:11:33 +0000 (21:11 +0800)
committerChris <chris@roojs.com>
Wed, 2 Apr 2014 13:11:33 +0000 (21:11 +0800)
GoogleTranslate.php

index 9df1f3d..a2d7a91 100644 (file)
@@ -63,7 +63,7 @@ class Pman_Core_GoogleTranslate extends Pman
             $this->jerr('does not have translated text.', print_r($responseDecoded, true));
         }
         var_dump($responseDecoded->data->translations[0]->translatedText);
-        $responseDecoded->data->translations[0]->translatedText = rawurldecode($responseDecoded->data->translations[0]->translatedText);
+        $responseDecoded->data->translations[0]->translatedText = rawurldecode(str_replace(' ', '', $responseDecoded->data->translations[0]->translatedText));
         $this->jok($responseDecoded->data->translations[0]);
         
     }