开发者

Play Framework messages in controller

开发者 https://www.devze.com 2023-04-12 05:22 出处:网络
How can I access a value from the \"messages\" file in a controller? For example, in my \"messages\" file:

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

精彩评论

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