Results 1 to 7 of 7
- 10-28-2011, 11:38 AM #1
Member
- Join Date
- Oct 2011
- Posts
- 6
- Rep Power
- 0
change locale not working - please help me
Hi all,
I'm trying to develop a multilanguage web application, I found the instruction to change the language at this link
Chapter*13.*Web MVC framework
and I have only add this code on my dispatcher-servlet :
and I try to change the language with this link : index.htm?siteLanguage=en_ENJava Code:<bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"> <property name="paramName" value="siteLanguage"/> </bean> <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver"/> <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="interceptors"> <list> <ref bean="localeChangeInterceptor"/> </list> </property> <property name="mappings"> <props> <prop key="login.htm">indexController</prop> <prop key="uploadfile.htm">fileUploadController</prop> <prop key="successUpload.htm">successUploadController</prop> </props> </property> </bean>
but is not working.
Please help me....
- 10-28-2011, 03:44 PM #2
Re: change locale not working - please help me
What does "it's not working" mean? What do you expect to happen? What happens instead?
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 10-28-2011, 03:57 PM #3
Member
- Join Date
- Oct 2011
- Posts
- 6
- Rep Power
- 0
Re: change locale not working - please help me
With the link index.htm?siteLanguage=en_EN i want to change the language of the page, but nothing happen when i load this url.
- 10-28-2011, 04:29 PM #4
Re: change locale not working - please help me
Um, I don't think there's a way to just change the language like that. Locale != language. Changing the language there does not magically change the text on the page, it just changes what language the browser thinks is being displayed, which doesn't really do much for you.
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 10-28-2011, 04:46 PM #5
Member
- Join Date
- Oct 2011
- Posts
- 6
- Rep Power
- 0
Re: change locale not working - please help me
I have a file properties with the label that I want to change the language, one properties for each language.
If I modify the language of the browser, it also change the language of my page, but I want to change language with a link on the page or somethings like this.
PS: I'm sorry for my poor English...
- 12-06-2011, 11:21 AM #6
Member
- Join Date
- Dec 2011
- Posts
- 5
- Rep Power
- 0
Re: change locale not working - please help me
I have the same problem.
The servlet xml succeed to load the message_en.properties
But the language was not changed by changing the url language parameter
I know that this work for some controllers (I have checked out localespring1 sample) but in my application the change of language do not take place.
- 12-07-2011, 08:41 PM #7
Member
- Join Date
- Oct 2011
- Posts
- 6
- Rep Power
- 0
Similar Threads
-
Line change in String is not working
By greenhorn in forum New To JavaReplies: 8Last Post: 05-30-2011, 11:17 PM -
how to change whole project in another language base on locale?
By krunalpatel1410 in forum AWT / SwingReplies: 3Last Post: 09-20-2010, 08:24 AM -
Locale example
By Java Tip in forum Java TipReplies: 0Last Post: 01-29-2008, 09:04 AM -
How ro change the locale of JVM
By ravi.ks007@hotmail.com in forum Advanced JavaReplies: 2Last Post: 12-26-2007, 06:17 AM -
Locale
By Java Tip in forum Java TipReplies: 0Last Post: 11-16-2007, 02:16 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks