Is it possible to use a JS variable inside @Messages
as a parameter? When I use this, I get the following error:
not found: value name
var name = "some name";
var title = "@Messages("message", name)"
It's not possible, @Messages
compiled on the server and javascript on the client. It will compile before javascript even if you will pre-compile it with some server side js engine.
Here is special module to compute messages on client side, but I am not sure it is still relevant for Play 2.5: