это моя часть перевода модели CertificateType:
Код: Выделить всё
public $actsAs = array('Translate'=>array('title','description')) ;
Код: Выделить всё
public $actsAs=array('Translate'=>array('filename')) ;
public $belongsTo = array(
'CertificateType' => array(
'className' => 'CertificateType',
'foreignKey' => 'certificate_type_id',
'conditions' => '',
'fields' => '',
'order' => ''
) ,
);
Код: Выделить всё
public function admin_index() {
$this->Certificate->locale = $this->Session->read('Config.language');
$this->Certificate->CertificateType->locale = $this->Session->read('Config.language');
$this->Certificate->recursive = 0;
$this->set('certificates', $this->paginate());
debug($this->Certificate->paginate()) ;
}
Подробнее здесь: https://stackoverflow.com/questions/187 ... ranslation