core/play/src/main/java/play/i18n/MessagesApi.java
public Messages preferred(Http.RequestHeader request) {
    play.api.i18n.Messages msgs = messages.preferred(request);
    return new MessagesImpl(new Lang(msgs.lang()), this);
  }
public Messages preferred(Http.RequestHeader request) {
    play.api.i18n.Messages msgs = messages.preferred(request);
    return new MessagesImpl(new Lang(msgs.lang()), this);
  }
public Messages preferred ( Http . RequestHeader request ) { play . api . i18n . Messages msgs = messages . preferred ( request ) ; return new MessagesImpl ( new Lang ( msgs . lang ( ) ) , this ) ; }
Get a messages context appropriate for the given request.

<p>Will select a language from the request, based on the languages available, and fallback to
the default language if none of the candidates are available.

@param request the incoming request
@return the preferred messages context for the request
Get a messages context appropriate for the given request .