I would like to know if there is a way to use i18n with scala/playframework, this is what I have tried to do so far :
@()(
implicit
params:play.mvc.Scope.Params,
flash:play.mvc.Scope.Flash,
errors:Map[String,play.data.validation.Error]
)
@import play.i18n.Messages
@main(title = "The title") {
<p>Hello world in &{'english'}</p>
}
I also tried with Message.get(...) instead of &{...} but it didn't help
here is what I use:
@import play.i18n._
@main(title = "The title") {
<p>Hello world in @Messages.get("english")</p>
}
Note the @ before the call to Messages.get("...").
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With