I developed a web application using JSP/JavaBeans for my recent project. After project completed, we found out that we need to put more than one language for our portal. After some study we found that we need to use XML technology in order to make it multiple language enable. But this need a very huge modification to our JSP scripts which total about 200 files. Would you suggest the best way to transform from current application to the modified application with multiple language support. Our concern here is to minimize the changes that we are going to do with the current application.
Thank you in advance for you ideas.
I hate to tell you this, but you are in for a huge amount of pain. Adding Internationalization after the fact simply require a lot of rewrites. Essentially, you will need to locate every hard-code string value in your original language and turn it into some kind of internationalized lookup.
The best advice I can give you is to look at the existing internationalization tag library. The internationalization library in JSTL is reasonably good.
i don't think it is that much of work, as long as you are only internationalizing the JSPs. The most work will be making database stuff in different languages (like a product description for example), because you will need to modify queries, value objects, etc.
For JSPs, all you need is to use the internationaliation library of JSTL (if you are using JSP 1.2) or you can use the jakarta il8n tag lib for JSP 1.1
A typical change would be:
Name = <input type="text" name="name">
<fmt:message key="Name" /> = <input type="text" name="name">
To make things easier, keep only one bundle for your jsps. You can name the bundle properties as "JspName.Name" if you want a specific label for a particular page.