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 Euro for currency calculations, expect a space as a thousand separator when displaying numbers, and use a "," (comma) as a decimal point. On the other hand, when the same Dutch company wants to open a market in America, they expect the same web application...