Skip to content

Kirby 6.0.0

$modelWithContent->translation()

Returns a single translation by language code If no code is specified the current translation is returned

$modelWithContent->translation(string|null $languageCode = null): Translation

Parameters

Name Type Default
$languageCode stringornull null

Return type

Kirby\Content\Translation

Exceptions

Type Description
Kirby\Exception\NotFoundException If the language does not exist

Parent class

Kirby\Cms\ModelWithContent