Example usage for org.springframework.http HttpHeaders CONTENT_LANGUAGE

List of usage examples for org.springframework.http HttpHeaders CONTENT_LANGUAGE

Introduction

In this page you can find the example usage for org.springframework.http HttpHeaders CONTENT_LANGUAGE.

Prototype

String CONTENT_LANGUAGE

To view the source code for org.springframework.http HttpHeaders CONTENT_LANGUAGE.

Click Source Link

Document

The HTTP Content-Language header field name.

Usage

From source file:nu.yona.server.rest.LocalizationFilter.java

@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain)
        throws IOException, ServletException {
    HttpServletRequest request = (HttpServletRequest) servletRequest;
    HttpServletResponse response = (HttpServletResponse) servletResponse;

    request = new LocalizationRequestWrapper(properties, request);
    response.setHeader(HttpHeaders.CONTENT_LANGUAGE, Translator.getStandardLocaleString(request.getLocale()));

    chain.doFilter(request, response);//from w  ww .j  a v a  2s.  co m
}