I am trying to setup Spring MVC 3.0 to support localization. The messages are in messages_en.properties and messages_fr.properties. It works, but I cannot figure out how to support localized JSP pages. I have tried naming them sample_en.jsp for example, but it does not work.
I use ControllerClassNameHandlerMapping, BeanNameViewResolver & InternalResourceViewResolver, LocaleChangeInterceptor and SessionLocaleResolver.
Any idea?
The typical approach for JSP localization is to use
fmt:message(orspring:message) to render localized strings from.propertiesfiles. It doesn’t require to maintain different versions of page markup for different locales.The approcah with localized JSP files is not supported out of the box, though it can be implemented by subclassing
InternalResourceViewResolverand overridingloadView().