src/Validators/Validator.php
protected function formatMessage($message, $params)
    {
        // TODO: Add working i18n component
        /*if (\Reaction::$app !== null) {
            return \Reaction::$app->getI18n()->format($message, $params, \Reaction::$app->language);
        }*/

        $placeholders = [];
        foreach ((array)$params as $name => $value) {
            $placeholders['{' . $name . '}'] = $value;
        }

        return ($placeholders === []) ? $message : strtr($message, $placeholders);
    }
protected function formatMessage($message, $params)
    {
        // TODO: Add working i18n component
        /*if (\Reaction::$app !== null) {
            return \Reaction::$app->getI18n()->format($message, $params, \Reaction::$app->language);
        }*/

        $placeholders = [];
        foreach ((array)$params as $name => $value) {
            $placeholders['{' . $name . '}'] = $value;
        }

        return ($placeholders === []) ? $message : strtr($message, $placeholders);
    }
Formats a message using the I18N, or simple strtr if `\Reaction::$app` is not available.
@param string $message
@param array $params
@return string