java - How to switch between 2 message bundles? -


I have some problems dealing with the i18n of my webpage. Is this a springboard to get a message in a message server? Is it possible if he is not getting in the other?

This is my spring configuration

  & lt; Bean id = "messageSource" class = "org.springframework.context.support.ResourceBundleMessageSource" & gt; & Lt; Property name = "basename" value = "xxmsassage" /> & Lt; / Bean & gt; & Lt; Bean id = "locale resulator" class = "org.springframework.web.servlet.i18n.SessionLocaleResolver" & gt; & Lt; Property Name = "Default Local" value = "N" /> & Lt; / Bean & gt; Example: If the key is "login.user" and the value is present in the locale "n" app in my xx_en.properties, but I want to find another file (xx_es.properties). ) If the key does not exist, is it possible?  

PS: Sorry for my english: D

Thanks advance!

I think you need interceptor configuration in your spring configuration

  & lt; Interceptors & gt; & Lt; Beam: Bean class = "org.springframework.web.servlet.i18n.LocaleChangeInterceptor" & gt; & Lt; Beans: property name = "nickname" value = "locale" /> & Lt; / Bean: beans & gt; & Lt; / Interceptor & gt;  

Comments