2010-08-22 22:49
浏览 26


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?

图片转代码服务由CSDN问答提供 功能建议

我刚开始使用CakePHP,我正在学习如何使用Bake。 当使用 $ this-> Session-> setFlash(__('帖子无法保存。请再试一次。',true)); 时,为什么生成的CRUD有__ 那里的真实情况是什么?

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • dongshan9619 2010-08-22 23:02

    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.

    打赏 评论
  • dskyx46424 2010-08-22 22:59

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

    打赏 评论

相关推荐 更多相似问题