我认为双下划线总是表示私有(private)函数,但在 cakephp 2.0 中这样的例子中它是什么意思 http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html
例如
$this->Session->setFlash(__('The user could not be saved. Please, try again.'));
最佳答案
CakePHP 中的双下划线函数处理本地化。当您想通过提供字符串翻译字典来翻译您的应用程序时使用它。
关于php - cakephp 2.0 中的双下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9319600/