private function translate(string $template, array $parameters): string
    {
        $placeholders = array_map([$this, 'getPlaceholder'], array_keys($parameters));
        $replacements = array_map([$this, 'getTranslatedValue'], array_values($parameters));

        return str_replace($placeholders, $replacements, $template);
    }