Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play framework 2 - i18n in javascript files

I am using Scala Play Framework 2. I want multilanguage javascript files and it would be perfect to have the possibility to put Messages("title.items") inside javascript files.

To do so, I think we should create a new Asset controller that inject the Lang object. Is there a better way? Where could I find some resources about?

like image 349
Matroska Avatar asked Aug 24 '26 04:08

Matroska


1 Answers

You can use the JsMessages plugin for Play2

like image 101
Julien Lafont Avatar answered Aug 26 '26 17:08

Julien Lafont



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!