• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

resource bundle in struts 2

 
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I have 4 virtual host pointing the the same context in tomcat.
I parse the serverName() to set properties for the site. I need to use diffrent resource bundels for the sites.

ie. www.site1.com , www.site1.se , www.site2.com, www.site2.se

The site1.se and com are the same only diffrents is the language. The text on site1 and site2 can be diffrent. How can I set upp resource bundels for this in struts 2?

// Mathias
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This doesn't answer your question directly, but Struts has internationalization (i18n) built in. In a nutshell, it will get the locale and language of the browser making the requests and use the corresponding application resource file. It works like a charm.

I believe it is possible to load the app resources at will, but I think it opens up a whole ton of synchronization problems. I've read a bunch of threads where people try to dynamically load an app resources file to no avail.
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok thanks!

What is the best approach. when user sends request to www.site1.se then there must be swedish text. If www.site1.com english. www.site2.se swedish but it could differ from site1.

Any suggestions?
 
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic