Reference

Guide

I18n::template()

Translate by key and then replace placeholders in the text

I18n::template(string $key, string $fallback = null, array $replace = null, string $locale = null): string

Parameters

Name Type Default Description
$key string
$fallback string null
$replace array null
$locale string null

Return type

string

Source code

kirby/src/Toolkit/I18n.php#L148