• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

changing local and redirecting to same page using struts2

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I am displeased. You are no longer allowed to read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic