> I'm pretty new to Struts usage so it might be i'm overlooking 
> an obvious solution to this. The thing I've been looking at 
> Internationalization issues concerned with Struts. The thought 
> of being able to change the whole language of a site simply by 
> changing the locale of the user really appeals to me. All 
> examples i've seen so far use parallel versions of the
> ApplicationResources.properties file to accomplish this. 
> Whilst this may be feasibel for a fairly small site I don't see 
> how this solution would hold up for a large site (with serveral 
> hundred concurrent requests to anyone of several thousand pages).
> 
> The problems/questions I can see are:
> 
> As a single textfile is used, when there are several thousand 
> entries it will become difficult to manage.Can updates be made, 
> during operation, to the contets. 

Bundles are loaded at application startup. There may be containers out there that has 
the ability to reload resource bundles after server startup, but I'm not aware of any. 

> What happens if a user requests the files content while it is being edited ?

It's cached by the application server; editing it will have no affect until the server 
is restarted.

> Is the textfile cached for performance, or will concurrent 
> calls compete for the same file-resource ?

See previous answer.

> As I'm probably not the first person who is trying to use 
> Struts on a larger scale for internationalization issues I thought 
> someone might have a better solution. Suggestions ?

You are right about one thing: resource bundles are good in some cases, but if you 
need to be able to change them without restarting your server, then they aren't the 
way to go. At my company we have developed a database-backed persistance mechanism 
that we use for I18N (and other things, such as tiles, stylesheet elements, and so 
forth.)

Of course, you could always just subclass ResourceBundle and have it behave like you 
need. That'd be a wee bit simpler. :)

java.sun.com article that may be helpful:

http://developer.java.sun.com/developer/technicalArticles/Intl/ResourceBundles/

-= J

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to