src/Mail/TranslatorAwareMessage.php
public function setSubject($subject, $translate = true)
    {
        if (false !== $translate) {
            $translator = $this->getTranslator();
            $domain     = $this->getTranslatorTextDomain();

            if (true === $translate) {
                $subject = $translator->translate($subject, $domain);
            } else {
                $args = func_get_args();
                $args[0] = $translator->translate($args[0], $domain);
                $subject = call_user_func_array('sprintf', $args);
            }
        }

        return parent::setSubject($subject);
    }
public function setSubject($subject, $translate = true)
    {
        if (false !== $translate) {
            $translator = $this->getTranslator();
            $domain     = $this->getTranslatorTextDomain();

            if (true === $translate) {
                $subject = $translator->translate($subject, $domain);
            } else {
                $args = func_get_args();
                $args[0] = $translator->translate($args[0], $domain);
                $subject = call_user_func_array('sprintf', $args);
            }
        }

        return parent::setSubject($subject);
    }
Sets the message subject.

The passed string is automatically translated.
Any additional argument is passed in to sprintf to replace
placeholders in the subject string.

If the $translate is FALSE, the subject is NOT translated.

<pre>
<?php
$mail->setSubject('translated subject');
$mail->setSubject('translated %s with placeholder', 'subject');
$mail->setSubject('untranslated subject', false);
?>
</pre>

@param string $subject
@param bool|mixed $translate

@since 0.19
@since 0.29 Add sprintf support for translation

@return Message