play.api.i18n
Brings a convenient implicit conversion from play.api.mvc.RequestHeader to Messages.
Example:
import play.api.i18n.Messages class MyController(val messagesApi: MessagesApi) extends ControllerLike with I18nSupport { val action = Action { implicit request => Ok(Messages("some.key")) // Uses the client’s preferred language } }
Adds convenient methods to handle the client-side language
The MessagesApi to use.
A Messages value that uses the Lang found in the implicit scope
The preferred Messages according to the given play.api.mvc.RequestHeader
Brings a convenient implicit conversion from play.api.mvc.RequestHeader to Messages.
Example: