Hi All,
I am trying to get tiles working with localisation support.
I have 3 files (tiles-def.xml,tiles-def_us.xml,tiles-def_de.xml) which represent the layouts for a particular locale.
When a user logs in, he selects a locale, the select localed will be based off the particular locale tiles definition.
E.g User selects the "us" locale, then the tiles-def_us.xml will be loaded
Everytime I select the locale the default locale is always selected with the default tiles-definition..
How do I set the locale so that my tiles configuration will load up the correct tiles definition.
Heres is a snippet of my application context.xml
Code:<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles.TilesConfigurer"> <property name="factoryClass"> <value>org.apache.struts.tiles.xmlDefinition.I18nFactorySet</value> </property> <property name="definitions"> <list> <value>/WEB-INF/tiles/tiles-def.xml</value> </list> </property> </bean> <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"> <property name="paramName"><value>siteLanguage</value></property> </bean> <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="interceptors"> <list> <ref local="localeChangeInterceptor"/> </list> </property> <property name="mappings"> <props> <prop key="*.sp">springappController</prop> </props> </property> </bean> <bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"> </bean>
Any help would be gratefully appreciated
Regards
Dan


Reply With Quote