The values of string template placeholders can be defined with the format filter. These placeholders are %s
(string) and %d
(number). In the following example, the value 10 is set for the message number. The format parameter is added with this variable as a parameter. The result is having this number in the string.
{{ "You have %d messages."|format("10") }}
Result
You have 10 messages.