I18n::template()
Translate by key and then replace placeholders in the text
I18n::template(string $key, array|string|null $fallback = null, array|null $replace = null, string|null $locale = null): string
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $keyrequired | string |
no default value | |
| $fallback | arrayorstringornull |
null
|
Fallback text or, if it is an array, the replacements |
| $replace | arrayornull |
null
|
|
| $locale | stringornull |
null
|
Return type
string