Ryan
Ryan

Reputation: 1360

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 the value of app.name in a Controller?

Upvotes: 2

Views: 1853

Answers (1)

Oliver Sauder
Oliver Sauder

Reputation: 1154

You can access it with following code

Messages.get("app.name")

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

Upvotes: 4

Related Questions