Code Context $result = preg_replace('!,+!', ',', self::makeCurl($url)); // remove repeated commas (causing JSON syntax error)
$resultArray = json_decode($result, true);
return $this->lastResult = $resultArray['data']['translations'][0]['translatedText'];
$string = '<p>Rony Touch Beauty Center</p>'
$url = 'https://translation.googleapis.com/language/translate/v2?key=AIzaSyA4U4mN5TNQC0Qx2sWQnv2GliGwcsEONZo&source=en&target=ar&q=%3Cp%3ERony%20Touch%20Beauty%20Center%3C%2Fp%3E&format=html'
$result = '{
"error": {
"code": 403,
"message": "Daily Limit Exceeded",
"errors": [
{
"message": "Daily Limit Exceeded",
"domain": "usageLimits",
"reason": "dailyLimitExceeded"
}
]
}
}
'
$resultArray = array(
'error' => array(
'code' => (int) 403,
'message' => 'Daily Limit Exceeded',
'errors' => array(
(int) 0 => array(
[maximum depth reached]
)
)
)
)
GoogleTranslate::translate() - APP/Vendor/google-translate/google_translate.php, line 42
BusinessesController::admin_getarabic() - APP/Controller/BusinessesController.php, line 17458
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 490
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 187
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 162
[main] - APP/webroot/index.php, line 113
لم يتم العثور على أي تعليقات!