-
Mar 1st, 2006, 01:16 AM
#1
MultiLanguage Spring Application
Hi All,
We are developing a MultiLanguage Application in Spring Framework. When i use the
<bean id="ms" class="org.springframework.context.support.Resourc eBundleMessageSource">
<property name="basenames">
<list>
<value>msg1</value>
<value>msg2</value>
<value>msg3</value>
</list>
</property>
</bean>
ResourceBundleMessageSource, All the Label in my UI is loded through the Above Property files. If i want to change the Another Language like French What i have to do?
Thanks in Advance.
Badhu
-
Mar 1st, 2006, 04:18 AM
#2
hi,
Do the follwoinbg things in ur projectname-Servlet.xml
<bean id="localeChangeInterceptor"
class="org.springframework.web.servlet.i18n.Locale ChangeInterceptor">
<property name="paramName"><value>siteLanguage</value></property>
</bean>
<bean id="localeResolver"
class="org.springframework.web.servlet.i18n.Sessio nLocaleResolver"/>
after this add the localeChangeInterceptor in url mappings.
Regards,
Shahzad
-
Mar 1st, 2006, 05:44 AM
#3
Multilanguage Spring Application
Hello Shahzad
I Have to specify the
<bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.Locale ChangeInterceptor">
<property name="paramName"><value>siteLanguage</value></property>
</bean>
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.Sessio nLocaleResolver"/>
the above <bean> tag in my application-servlet.xml file. After the URL mapping.
Instead of siteLanguage can i put us / fr / ar something like this.
In my Application i used more than one ApplicationContext files i specified in my web.xml.
Can i add the above <bean> tags in my applicationContext.xml file.
Pls give ur suggestion.
Thanks in Advance
Badhu
-
Mar 1st, 2006, 10:24 PM
#4
You can do this
Hi,
You can do this in Application Conext XMl.
<bean id="localeResolver"
class="org.springframework.web.servlet.i18n.Sessio nLocaleResolver"/>
Regards,
Shahzad
-
Mar 14th, 2007, 07:16 PM
#5
Can you please explain more details?
i put the localeChangeInterceptor bean and the localeResolver in my springdispatcher-servlet.xml.
How can i now load all my text from the database???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules