This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am in process of developing a multilingual website. Struts support multilingual developement with different resource file. I am able to implement that successfully. But the above implementation reads the locale setting from the browser setting. I need to change the language of the website on the click of a link. to implement this i should be able to change the locale setting through code. Kindly guide me to achieve the same? Is it possible that i extend some class and set the locale variable thorugh there? or through some configuration setting in struts framework will get the value of locale variable from some user defined variable?
See the struts stores the locale in session when the session is created ..........and it wont update the same for every request ....it will update only when the new session is created tgatswhy if uc lose the browser and opena new browser the language change will get effected ...
so if u want that to be changed immedaitely u want to over ride the RequestProcessor provided by struts and especailly u should override the processLocale method ....in that u should get the locale from the request and update the session varible everytime