src/Validator/AbstractValidator.php
private function translateMessage($message, $language = null)
    {
        if ($language !== null) {
            $language = (string) $language;
            if ($language === '') {
                throw new \InvalidArgumentException('$language cannot be empty');
            }
        }

        $translator = $this->getTranslator();

        if (!$translator) {
            return $message;
        }

        return $translator->translate($message, null, $language);
    }
private function translateMessage($message, $language = null)
    {
        if ($language !== null) {
            $language = (string) $language;
            if ($language === '') {
                throw new \InvalidArgumentException('$language cannot be empty');
            }
        }

        $translator = $this->getTranslator();

        if (!$translator) {
            return $message;
        }

        return $translator->translate($message, null, $language);
    }
@param string $message
@param string $language

@throws \InvalidArgumentException

@return string