Fr3nch13/CakePHP Utilities

TranslateTrait

Contains a translation method aimed to help managing multiple translations for an entity.

Table of Contents

Methods

translation()  : EntityInterface|$this
Returns the entity containing the translated fields for this object and for the specified language. If the translation for the passed language is not present, a new empty entity will be created so that values can be added to it.

Methods

translation()

Returns the entity containing the translated fields for this object and for the specified language. If the translation for the passed language is not present, a new empty entity will be created so that values can be added to it.

public translation(string $language) : EntityInterface|$this
Parameters
$language : string

Language to return entity for.

Return values
EntityInterface|$this

        
On this page

Search results