TranslateBehavior (class)

Class TranslateBehavior

This behavior provides a way to translate dynamic data by keeping translations in a separate table linked to the original record from another one. Translated fields can be configured to override those in the main table when fetched or put aside into another property for the same entity.

If you wish to override fields, you need to call the locale method in this behavior for setting the language you want to fetch from the translations table.

If you want to bring all or certain languages for each of the fetched records, you can use the custom translations finders that is exposed to the table.

Cake\ORM\Behavior implements Cake\Event\EventListenerInterface uses 登录查看完整内容