Skip to content

Kirby 5.0.1

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
$keyrequired string no default value
$fallback arrayorstringornull null
$replace arrayornull null
$locale stringornull null

Return type

string

Parent class

Kirby\Toolkit\I18n