Table of Contents |
---|
...
LocaleChangeInterceptor configuration
You also need to add the mvc XML namespace to conf/global.xml:
Code Block | ||
---|---|---|
| ||
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
[...]
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="[...]
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
[...]"
[...] |
Code Block | ||
---|---|---|
| ||
<mvc:interceptors> <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"> <property name="paramName" value="lang"/> </bean> </mvc:interceptors> |
...
$rpUIContext properties - ie. serviceName, organizationName, getServiceDescription() - are being translated properly according to selected locale.
#springMessageText macro and other $springMacroRequestContext.getMessage() calls always return values from the messages_lang.properties file
Only when you create messages_en.properties and put ie idp.title = Login service there - the value for ‘en’ locale gets selected - otherwise it always fallback as in 4.
...