Hello all,
I would like to know how could the LocaleChangeInterceptor and the CookieLocaleResolver handle this problem:
a )
one harcoded language in jsp:
b)Code:<a href="?lang=de">
The browser could be set to de_CH or de_DE.
c)
Spring should decide now which Locale has to be loaded: de_CH or de_DE. The information should come from system settings or from the browser or from a cookie).
d)
Finally I have a goal: just show one entry in JSP ("german") and not hard coded ("germanDE = de_DE" and "swissgerman = de_CH").
Thx a lot for hints
currently I have:
Code:<a href="?lang=de_CH"> ... <mvc:interceptors> <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" p:paramName="lang" /> </mvc:interceptors> <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver"> <property name="cookieName" value="my_language" /> <property name="cookieMaxAge" value="3600" /> </bean>
jbeau



Reply With Quote