Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

changing local and redirecting to same page using struts2

 
hitesh sathawane
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing a database driven website using struts2 springs hibernet,
It is a rock climbing information website.
The Information is stored in database in 2 language.
by default internationalization is supported by Struts2,
I want to impliment following functionality.
changing the language in select box should redirect me to same page but with changed language.
Is there any struts2 plugin available for such functionility ?
Do any one have any idea how to implement this functionality.

 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts 2 provides internationalization it's in built funcationality but it can't read properties from database, we should define in resource bundles http://www.vaannila.com/struts/struts-example/struts-i18n-example-1.html We can display the dynamic content by retrieving from the database but static content declare in resource bundles.
 
hitesh sathawane
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am aware of what you suggested. I wanted to implement this functionality (generalize action to change the local and generate result.
For this I guess if current Urls local parameter is changed we can achieve, but I do not know what would be the mechanizam to trace the current URL

Regards
Hitesh Sathawane
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
generalize action to change the local and generate result.


Can you please elaborate it.

As per your requirement Language preference was change in back-end you can trigger the action and identify the language what is selected and display the content appropriate language.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic