Hi,
I'm currently managing localization for my site, with a FixedLocaleResolver bean.
My site is based on jsp (no controller) and rest service, and I'm using <spring:message> tag to get my locale value.
Code:(ex : <spring:message code="page.title"/> )
When I know the current user locale (ie a message_<locale>.properties exists), my configuration works fine. But when I try to fallback to a default locale because I'm not supporting the language, it doesn't work.
My configuration (for internationalization) is the following :
Code:<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basename" value="file:${jetty.home}/resources/message" /> <property name="defaultEncoding" value="UTF-8" /> </bean> <bean id="localeResolver" class="org.springframework.web.servlet.i18n.FixedLocaleResolver"> <property name="defaultLocale" value="en_US" /> </bean>


Reply With Quote
