src/ChrisKonnertz/DeepLy/DeepLy.php
public function translateSentences(array $sentences, $to = self::LANG_EN, $from = self::LANG_AUTO, $join = false)
    {
        $translationBag = $this->requestTranslation($sentences, $to, $from);

        $translatedSentences = $translationBag->getTranslatedSentences();

        if ($join) {
            return implode(' ', $translatedSentences);
        }

        return $translatedSentences;
    }
public function translateSentences(array $sentences, $to = self::LANG_EN, $from = self::LANG_AUTO, $join = false)
    {
        $translationBag = $this->requestTranslation($sentences, $to, $from);

        $translatedSentences = $translationBag->getTranslatedSentences();

        if ($join) {
            return implode(' ', $translatedSentences);
        }

        return $translatedSentences;
    }
Translates a text. Returns a string array of translation sentences.
ATTENTION: The target language parameter is followed by the source language parameter!
This method might throw an exception so you should wrap it in a try-catch-block.

@param string[]    $sentences The sentences you want to translate
@param string      $to        Optional: The target language, a self::LANG_<code> constant
@param string|null $from      Optional: The source language, a self::LANG_<code> constant
@param bool        $join      If true, join all sentences to a single string
@return \string[] Returns a string array (might be empty)