A
A
AlexKuznec2017-03-10 14:38:19
Machine translation from one language to another
AlexKuznec, 2017-03-10 14:38:19

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();

I get a line with a bunch of hlml markup, and I didn’t notice the translation itself there.
When I tried to set the request format, the answer did not come at all:
->setFormat(Client::FORMAT_JSON)
I need to receive translations of phrases for several words, at least a hundred per day. But it's free) Google results were usually the best)
Is it possible to somehow simulate small queries from the user? Preferably with a short answer

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2017-03-10
@dimonchik2013

no
Yandex, Bing for free - yes
, you can still search for services that use it, there is a little free

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question