开发者

Play Framework messages in controller

How can I access a value from the "messages" file in a controller?

For example, in my "messages" file:

app.name = Play Framework App

How can I get 开发者_JAVA百科the value of app.name in a Controller?


You can access it with following code

Messages.get("app.name")

Also see http://www.playframework.org/documentation/1.2.3/i18n#retrieve

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜