tags:

views:

43

answers:

2

I just started using CakePHP, and am learning how to use Bake. Why does the CRUD is generates have __ when using $this->Session->setFlash(__('The post could not be saved. Please, try again.', true)); and what is the true there for?

+1  A: 

I believe they're used for localization of a given string. WordPress does something similar.

Collin Allen
+2  A: 

It's the function used to translate the string passed as argument. Other CMSes / frameworks (also in different programming languages) use a function with similar name.

kiamlaluno