Generating Separate Sets of JSPs for Different Locales
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sripada_Srinivas
Posted On:   Tuesday, July 10, 2001 11:16 PM

Hi, This is a generic question but asked with reference to a application I have 50 Screens to be displayed in 4 different languages. Now I create 50 JSPs, which use a Custom Tag library for internationlization (which at runtime determine the locale of the user and populate corresponding lable from the Properties file. Thanks to Jakarta!!). Or I use a seperate java application to generate now itself 200 JSPs with all the labels populated in corresponding languge and keep them ready(50 JSPs in 4 languages). I use a control servlet to direct to corresponding locale's JSP. Second approach gains the performance by little bit as it doesn't have to populate the lables at runtime. But It has the disad   More>>

Hi,


This is a generic question but asked with reference to a application


I have 50 Screens to be displayed in 4 different languages.


Now I create 50 JSPs, which use a Custom Tag library for internationlization (which at runtime determine the locale of the user and populate corresponding lable from the Properties file. Thanks to Jakarta!!).


Or I use a seperate java application to generate now itself 200 JSPs with all the labels populated in corresponding languge and keep them ready(50 JSPs in 4 languages). I use a control servlet to direct to corresponding locale's JSP.

Second approach gains the performance by little bit as it doesn't have to populate the lables at runtime. But It has the disadvantage of increasing the JSPs as the number of languages to support increases.

I want to know the affect of using these two approaches in a clustered environment.

Can someone throw light on the advantages/disadvantages these two approaches?

regards,

Sripada

   <<Less

Re: Generating Separate Sets of JSPs for Different Locales

Posted By:   Michael_Wax  
Posted On:   Wednesday, July 11, 2001 10:53 AM

I would choose the second approach (generating JSPs in all languages) only if I really needed the performance gain, because it would be a maintenance nightmare. Every time that you modify a single JSP under this approach, you need to regenerate the files. In any real-world situation, someone is going to forgot to do this regeneration, and your different language JSP sets will be out of synch.
About | Sitemap | Contact