My site is in 2 languages (english and italian)
My SiteMessagesController.php controller code:
public function index() {
$this->SiteMessage->locale = 'it';
$this->SiteMessage->recursive = 0;
$this->set('siteMessages', $this->paginate());
}
Above code shows all messages in italian language from database. If I comment
the 1st line of code, then it will show messages in english.
If I go with this in whole site, I have to write $this->SiteMessage->locale = 'it';
line before $this->ModelName->find();
in each action of each controller.
Is there any way to set $locale
to 'it'
for each model?