src/ChrisKonnertz/DeepLy/ResponseBag/TranslationBag.php
public function getTranslatedSentences()
    {
        $translatedTexts = [];

        foreach ($this->responseContent->translations as $translation) {
            // The beams array contains 1-n translation alternatives.
            // The first one (index 0) is the "best" one (best score)
            $translatedTexts[] = $translation->beams[0]->postprocessed_sentence;
        }

        return $translatedTexts;
    }
public function getTranslatedSentences()
    {
        $translatedTexts = [];

        foreach ($this->responseContent->translations as $translation) {
            // The beams array contains 1-n translation alternatives.
            // The first one (index 0) is the "best" one (best score)
            $translatedTexts[] = $translation->beams[0]->postprocessed_sentence;
        }

        return $translatedTexts;
    }
Returns a string array (might be empty) with all translation texts.
Every item in the result array will be one sentence.

@return string[]