Skip to main content

LocaleChangeInterceptor

Learn LocaleChangeInterceptor (Internationalization, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes LocaleChangeInterceptor is a HandlerInterceptor that reads a request parameter (default name locale ) and calls setLocale on the LocaleResolver . Usage : a link such as /home?lang=fr switches the language for the following requests. Needs a writable resolver : it works with session or cookie resolvers, not with the header resolver.

More lessons in Internationalization