public Request acceptLanguage ( String language ) { final String acceptLanguage = RequestHeaderFields . ACCEPT_LANGUAGE . getName ( ) ; String languageValue = headers . get ( acceptLanguage ) ; if ( languageValue == null ) { languageValue = language ; } else { languageValue = languageValue + ", " + language ; } return this . setHeader ( acceptLanguage , languageValue ) ; }
sets the accept language header for the request if exists then appends