Translation of routes with CakePHP

0

I am studying CakePHP for possible use in a project, and the crucial point of this project is that it is multi-language. I've already done a lot of research on translation of the routes:

  http://projeto.com/contact

  http://projeto.com.br/contato

  http://projeto.es/contacto

But I did not find content that addressed the subject. Does anyone have this answer? :)

    
asked by anonymous 19.08.2014 / 21:12

1 answer

1

If the pages are static, you'll have to create one by one. To simplify the process you can do the following:

Controller

public function contact() {
    ...

    $this->render('contact');
    $this->response->send();
    $this->_stop();
}

public function contato() {
    $this->contact(); 
}

public function contacto() {
    $this->contact(); 
}

Viewer

echo $this->Html->link(__('Contact'), array('action' => __('contact')));
    
20.08.2014 / 16:30