Stichoza / google-translate-php

🔤 Free Google Translate API PHP Package. Translates totally free of charge.
MIT License
1.79k stars 380 forks source link

error #159

Closed danialbakhtiari3884 closed 3 years ago

danialbakhtiari3884 commented 3 years ago

Fatal error: Uncaught ErrorException: Client error: GET https://translate.google.com/translate_a/single?client=webapp&hl=en&dt=t&dt=bd&dt=at&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&sl=en&tl=ka&q=Goodbye&ie=UTF-8&oe=UTF-8&multires=1&otf=0&pc=1&trs=1&ssel=0&tsel=0&kc=1&tk=133894.276600 resulted in a 429 Too Many Requests response: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <meta http-equiv="content-type" content="te (truncated...) in C:\xampp\htdocs\wordpress\wp-content\plugins\wp-mock-translator-master\vendor\stichoza\google-translate-php\src\GoogleTranslate.php:311 Stack trace: #0 C:\xampp\htdocs\wordpress\wp-content\plugins\wp-mock-translator-master\vendor\stichoza\google-translate-php\src\GoogleTranslate.php(228): Stichoza\GoogleTranslate\GoogleTranslate->getResponse('Goodbye') #1 C:\xampp\htdocs\wordpress\wp-content\plugins\wp-mock-translator-master\plugin.php(16): Stichoza\GoogleTranslate\GoogleTranslate->translate('Goodbye') #2 C:\xampp\htdocs\wordpress\wp-settings.php(388): in C:\xampp\htdocs\wordpress\wp-content\plugins\wp-mock-translator-master\vendor\stichoza\google-translate-php\src\GoogleTranslate.php on line 311

require(__DIR__.'/vendor/autoload.php');
use Stichoza\GoogleTranslate\GoogleTranslate;

$tr = new GoogleTranslate();
echo $tr->setSource('en')->setTarget('ka')->translate('Goodbye');
Stichoza commented 3 years ago

1. READ THE README.

2. If you don't want to read that small README text, at least check if there are same issues already answered. Because THERE ARE MANY.

3. And actually there is a PINNED ISSUE about the exact same error.

4. If you're avoiding all of these, at least write a description of what problem are you having.

This is just disrespectful and wastes everyones time. 😕