Skip to main content

LocaleResolver

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

Fresher Notes LocaleResolver is the Spring MVC interface that decides the locale of each request; the DispatcherServlet calls it first and exposes the result. Built-in types : AcceptHeaderLocaleResolver (default, reads Accept-Language ), SessionLocaleResolver , CookieLocaleResolver and FixedLocaleResolver . Bean name matters : the bean must be called localeResolver , otherwise the DispatcherServlet does not find it.

More lessons in Internationalization