$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): Kirby\Content\Translation
Parameters
Name | Type | Default |
---|---|---|
$languageCode | string ornull |
null
|
Return type
This method modifies the existing $modelwithcontent
object it is applied to and returns it again.
Exceptions
Type | Description |
---|---|
Kirby\Exception\NotFoundException |
If the language does not exist |