Skip to content

Kirby 4.1.2

I18n::translate()

Translates either a given i18n key from global translations or chooses correct entry from array of translations according to the currently set locale

I18n::translate(array|string|null $key, array|string|null $fallback = null, ?string $locale = null): Closure|array|string|null

Parameters

Name Type Default
$key * array|string|null
$fallback array|string|null null
$locale string|null null

Return type

Closure|array|string|null

Parent class

Kirby\Toolkit\I18n