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("...").
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.