You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Linus Nikander <li...@nikander.net> on 2003/11/19 09:44:19 UTC

Large scale Internationalization using struts

I posted this same question a few months back but didn't really get any
answers that helped me decide on what to do. So here goes again:

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 content ? What happens if a
user requests the files content while it is being edited ?
Is the textfile cached for performance, or will concurrent calls compete for
the same file-resource ?

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 ?

//Linus Nikander - linus@nikander.net




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Large scale Internationalization using struts

Posted by Manish Singla <Ma...@Sun.COM>.
Linus Nikander wrote


>
> As a single textfile is used, when there are several thousand entries it
> will become difficult to manage.

As somebody already suggested you may use multiple bundles.
I have extended struts to have inheritance between bundles.
Thus wrote  own factory/class for message resources.

>
> Can updates be made, during operation, to the content ? What happens if a
> user requests the files content while it is being edited ?

We have written program to dynamically update cached resources. One has to clean
"LoadLocale" hashmap and other hashmaps. Nothing happens if user requests the
file content because once hashmaps are cleaned than struts will behave when
application runs for first request

>

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

Struts hery high performance caching.
With that struts flattens properties files i.e. struts automatically load keys
from "en" to "en_us" bundle if key is not found in en_us.

>
>
> 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 ?

Store in database or store in filesystem is same in almost all aspects. (except
for the first time there is database connection to load). After that everything
is as same as storing in filesystem.

>
>
> //Linus Nikander - linus@nikander.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org