src/I18n/Messages.php
public static function compose(string $message, ...$parameters): string
    {
        $translation = static::getTranslation($message);
        $result      = empty($parameters) === false ? \vsprintf($translation, $parameters) : $translation;

        return $result;
    }
public static function compose(string $message, ...$parameters): string
    {
        $translation = static::getTranslation($message);
        $result      = empty($parameters) === false ? \vsprintf($translation, $parameters) : $translation;

        return $result;
    }
public static function compose ( string $ message , ... $ parameters ) : string { $ translation = static :: getTranslation ( $ message ) ; $ result = empty ( $ parameters ) === false ? \ vsprintf ( $ translation , $ parameters ) : $ translation ; return $ result ; }
Try to translate the message and format it with the given parameters.

@param string $message
@param mixed  ...$parameters

@return string
Try to translate the message and format it with the given parameters .