Answer the question
In order to leave comments, you need to log in
Is it possible to get json from google translator for free?
Now through the browser, the request for translation to Google looks like this: https://translate.google.com/#en/ru/text
When trying to send such a request through yii2-httpclient:
$client = new Client();
// запрашиваем перевод
$response = $client->createRequest()
->setUrl('https://translate.google.com/#'. $this->fromLanguage .'/' . $this->toLanguage . '/' . $message)
->send();
->setFormat(Client::FORMAT_JSON)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question