Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

playframework : i18n + scala

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

like image 873
Roch Avatar asked Aug 29 '11 08:08

Roch


1 Answers

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("...").

like image 124
bluttringer Avatar answered Sep 29 '22 07:09

bluttringer