Rahul Rastogi
Rahul Rastogi

Reputation: 4698

create arrray in messages file with play.api.i18n.Messages with play

I want to retrieve an array of strings from Messages file. As simply value can be declared as key=value pair in messages file. And can be accessed in play framework as Messages("key"). But I am to create an array and access that in my controller. How to do that?

Upvotes: 0

Views: 91

Answers (1)

johanandren
johanandren

Reputation: 11479

You would have to define your own sub-encoding, for example comma separated, and then split the string returned from Messages.

Upvotes: 1

Related Questions