Re: Large scale Internationalization using struts
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 - [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Large scale Internationalization using struts
We have broken down our property files into different categories... i.e Messages (validation stuff), Information (FAQs etc), Content (page text) Since we still use sturts 1.0.2 we customized struts to load more than one message bundle at servlet initizliation. Our content varies from state to state, so we have designated Locale variant to represent a State. Messages_en.properties <- top level (msgs common to all states) Messages_es.properties Messages_en_us_CA.properties <- vary by state (specific msgs) Messages_es_us_CA.properties Messages_en_us_IL.properties Messages_es_us_IL.properties etc... Khalid Quoting Kirk Wylie <[EMAIL PROTECTED]>: > Daniel Joshua wrote: > > > My current resource file is 130+ KB and has 3000+ lines... > > > > Does not seem to be a big difference... > > > > There definately ppl who have tried with a bigger resource file, I > believe. > > Definitely. And I have to say that I've never used a database-backed > resource system, mostly because I've never seen the need for it > personally (usually in such cases the information is already in a > database record that I'm displaying in any case), and it should > definitely scale, and probably better than the database-backed system, > because you don't have the overhead of database calls. > > But if you really need something like dynamic updates, where resources > can be changed without bouncing the running application, then you'd need > to use a database-backed system. Of course I'd argue that it's probably > an error in design or organization usually to require that for > resources, but if someone's bound to have this requirement, then this is > the way to get it. > > Kirk Wylie > M7 Corporation > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Khalid K. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Large scale Internationalization using struts
Daniel Joshua wrote: My current resource file is 130+ KB and has 3000+ lines... Does not seem to be a big difference... There definately ppl who have tried with a bigger resource file, I believe. Definitely. And I have to say that I've never used a database-backed resource system, mostly because I've never seen the need for it personally (usually in such cases the information is already in a database record that I'm displaying in any case), and it should definitely scale, and probably better than the database-backed system, because you don't have the overhead of database calls. But if you really need something like dynamic updates, where resources can be changed without bouncing the running application, then you'd need to use a database-backed system. Of course I'd argue that it's probably an error in design or organization usually to require that for resources, but if someone's bound to have this requirement, then this is the way to get it. Kirk Wylie M7 Corporation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Large scale Internationalization using struts
My current resource file is 130+ KB and has 3000+ lines... Does not seem to be a big difference... There definately ppl who have tried with a bigger resource file, I believe. Regards, Daniel -Original Message- From: Kirk Wylie [mailto:[EMAIL PROTECTED] Sent: Friday, 21 November, 2003 2:33 AM To: Struts Users Mailing List Subject: Re: Large scale Internationalization using struts If you're looking for something database based, which it sounds like you are, from what I understand Struts 1.2 will be using the commons-resources package for message resource management (rather than the home-grown solution currently employed) (info at http://jakarta.apache.org/commons/sandbox/resources/index.html), which will have the ability to do what you want. Text files should scale very nicely since it's almost purely read-only access (as long as the rest of your infrastructure scales to such a level), but you will need to bounce things to update them, as discussed elsewhere on the list. Kirk Wylie M7 Corporation Linus Nikander wrote: > > > > > 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 ? > > > > In this case, you shouldn't be putting everything into one file. > > > > I'd be creating message bundles that corresponded to various sections of > > the web site. If nothing else, it's easy on the CM System if you've got > > a lot of developers. > > > > If I used text-files then I would definitely use more than one textfile. A > few problems still remain though. > > 1. Does this solution scale well ? > 2. How does one update the information without restarting ? > > Maybe someone knows of a free, DB-bound, content manager that could > accomplish the above whilst still providing a working integration with > struts ? > > //Linus Nikander. > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Large scale Internationalization using struts
If you're looking for something database based, which it sounds like you are, from what I understand Struts 1.2 will be using the commons-resources package for message resource management (rather than the home-grown solution currently employed) (info at http://jakarta.apache.org/commons/sandbox/resources/index.html), which will have the ability to do what you want. Text files should scale very nicely since it's almost purely read-only access (as long as the rest of your infrastructure scales to such a level), but you will need to bounce things to update them, as discussed elsewhere on the list. Kirk Wylie M7 Corporation Linus Nikander wrote: > > > 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 ? > > In this case, you shouldn't be putting everything into one file. > > I'd be creating message bundles that corresponded to various sections of > the web site. If nothing else, it's easy on the CM System if you've got > a lot of developers. > If I used text-files then I would definitely use more than one textfile. A few problems still remain though. 1. Does this solution scale well ? 2. How does one update the information without restarting ? Maybe someone knows of a free, DB-bound, content manager that could accomplish the above whilst still providing a working integration with struts ? //Linus Nikander. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Large scale Internationalization using struts
> > > 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 ? > > In this case, you shouldn't be putting everything into one file. > > I'd be creating message bundles that corresponded to various sections of > the web site. If nothing else, it's easy on the CM System if you've got > a lot of developers. > If I used text-files then I would definitely use more than one textfile. A few problems still remain though. 1. Does this solution scale well ? 2. How does one update the information without restarting ? Maybe someone knows of a free, DB-bound, content manager that could accomplish the above whilst still providing a working integration with struts ? //Linus Nikander. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Large scale Internationalization using struts
There have been lots of discussions of this on the archives. As released, there are no on the fly changes to the messages. There are many solutions in the archives although you might have to role your own using the ideas presented. Edgar > -Original Message- > From: Linus Nikander [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 19, 2003 3:44 AM > To: [EMAIL PROTECTED] > Subject: 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 - [EMAIL PROTECTED] > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Large scale Internationalization using struts
> > 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 ? Why would a large web site be configured such that maintenance happened in such a fashion?? > Is > the textfile cached for performance, or will concurrent calls > compete for the same file-resource ? I would *think* it's loaded at servlet.init() time, but that's me guessing. Like you say, for performance reasons, I'd kind of hope so. Should be easy enough to test. > 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 ? In this case, you shouldn't be putting everything into one file. I'd be creating message bundles that corresponded to various sections of the web site. If nothing else, it's easy on the CM System if you've got a lot of developers. -Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]