LocaleChangeInterceptor - internationalization

In the previous sections, we saw how to create an interceptor (ProcessingTimeLogInterceptor) and configure it in our web application context. Spring provides some pre-built interceptors that we can configure in our application context as and when needed. One such pre-built interceptor is LocaleChangeInterceptor, which allows us to change the current locale on every request and configures LocaleResolver to support internationalization.

Internationalization means adapting computer software to different languages and regional differences. For example, if you are developing a web application for a Dutch-based company, they may expect all the web page text to be displayed in the Dutch language, use the ...

Get Spring MVC Beginner’s Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.