projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a67b6bd
)
GoogleTranslate.php
author
Chris
<chris@roojs.com>
Wed, 2 Apr 2014 13:00:54 +0000
(21:00 +0800)
committer
Chris
<chris@roojs.com>
Wed, 2 Apr 2014 13:00:54 +0000
(21:00 +0800)
GoogleTranslate.php
patch
|
blob
|
history
diff --git
a/GoogleTranslate.php
b/GoogleTranslate.php
index
f9ec20f
..
a206308
100644
(file)
--- a/
GoogleTranslate.php
+++ b/
GoogleTranslate.php
@@
-52,12
+52,13
@@
class Pman_Core_GoogleTranslate extends Pman
$responseDecoded = json_decode($response);
curl_close($handle);
$responseDecoded = json_decode($response);
curl_close($handle);
+
if(!empty($responseDecoded->error)){
$this->jerr($responseDecoded->error->message);
}
if(!empty($responseDecoded->error)){
$this->jerr($responseDecoded->error->message);
}
- $responseDecoded->data->
data->
translations[0]->translatedText = rawurldecode($responseDecoded->data->data->translations[0]->translatedText);
- $this->jok($responseDecoded->data->
data->
translations[0]);
+ $responseDecoded->data->translations[0]->translatedText = rawurldecode($responseDecoded->data->data->translations[0]->translatedText);
+ $this->jok($responseDecoded->data->translations[0]);
}
}