Baby-Markt/deepl-php-lib

The Response seems to not be valid JSON

jatniel opened this issue · 1 comments

Error, two translations in each interaction of a foreach.
(Laravel Framework, PHP 8)

my function, for the translation:

    public function translation($text)
    {
        $deepl   = new DeepL($this->authKey,2,'api.deepl.com');

        $translate = $deepl->translate($text, 'en', 'fr');

        return $translate[0]['text'];
    }

u-nik commented

Hi @jatniel

Unfortunately, I cannot reproduce the problem with the given information. Please tell us the steps that lead to the error so that we can reproduce the problem.

Greetings,
Niklas