src/ChrisKonnertz/DeepLy/DeepLy.php
public function proposeTranslations($text, $to = self::LANG_EN, $from = self::LANG_AUTO)
    {
        $translationBag = $this->requestTranslation($text, $to, $from);

        return $translationBag->getTranslationAlternatives();
    }
public function proposeTranslations($text, $to = self::LANG_EN, $from = self::LANG_AUTO)
    {
        $translationBag = $this->requestTranslation($text, $to, $from);

        return $translationBag->getTranslationAlternatives();
    }
Translates a short text / a sentence. Returns an array of translation proposals.
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      $text The text 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
@return string[]         Returns translation alternatives as a string array
@throws \Exception