code: protected Locale getLocale(RequestContext context) {
      return this.locale != null ? this.locale : context.getExternalContext().getLocale();
    }
docs: Returns the locale to use when resolving messages.
  
  @param context
  the request context
  @return the locale to use