implicit class RequestWithMessagesApi extends AnyRef

Adds convenient methods to handle the messages.

Source
I18nSupport.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RequestWithMessagesApi
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new RequestWithMessagesApi(request: RequestHeader)

Value Members

  1. def lang(implicit messagesApi: MessagesApi): Lang

    Adds a lang method that can be used on a request, returning the lang corresponding to the preferred language of the request.

    Adds a lang method that can be used on a request, returning the lang corresponding to the preferred language of the request.

    For example:

    implicit val messagesApi: MessagesApi = ...
    val lang: Lang = request.lang
  2. def messages(implicit messagesApi: MessagesApi): Messages

    Adds a messages method that can be used on a request, returning the Messages object in the preferred language of the request.

    Adds a messages method that can be used on a request, returning the Messages object in the preferred language of the request.

    For example:

    implicit val messagesApi: MessagesApi = ...
    val messageFromRequest: Messages = request.messages("hello.world")