Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 571
  • Last Modified:

multi language - java web application How

Hi, we have manage to complete the system and it's up and running. The future expansion of the system will be to make it localise or multilinguae (multi langauge)

I am wondering how should i start it. I understand Java do support multi language. Can anyone share me their experience on this areas?

tq
0
chainreaction
Asked:
chainreaction
  • 5
  • 4
  • 3
  • +1
1 Solution
 
TimYatesCommented:
http://java.sun.com/developer/technicalArticles/Intl/MultilingualJSP/

Takes you through the JSTL fmt tags for localisation of JSP using Message Bundles

Tim
0
 
chainreactionAuthor Commented:
anyway not to use JSTL? cause i am only using JSP and servlet and object...

0
 
TimYatesCommented:
Yeah, you can load a ResourceBundle directly, and call getString on it:

http://www.cisco-cert.com/java/Oreilly.Java.Servlet.And.JSP.Cookbook/source/0596005725_jsvltjspckbk-chp-24-sect-5.html

Shows you an example (in a servlet)

Tim
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
suprapto45Commented:
However,

Please do consider Tim's suggestion to use JSTL as you will feel it on how easy it is in the future to use JSTL to support internationalization

David
0
 
bpmurrayCommented:
Did you use any particular framework for your app? If so, it may have some i18n stuff built in - for example, JSF makes it quite easy.
0
 
TimYatesCommented:
>> i am only using JSP and servlet and object...

Tim
0
 
bpmurrayCommented:
One other thing - make sure your pages are all tagged as charset=UTF-8. This means that the data must all be in Unicode, so it covers all characters. If you don't do this, you'll have to change the pages for each locale.
0
 
chainreactionAuthor Commented:
hi, i come across this i18N provided by Jakarta.


But i am desparetely looking for some example provided by them. Tim, do you have any ideas about this tag lib provided by them?

http://jakarta.apache.org/taglibs/doc/i18n-doc/intro.html

i can't find the sample program mentioned in there.

http://jakarta.apache.org/taglibs/doc/i18n-doc/index.html#examples

0
 
TimYatesCommented:
You'd be better off using the JSTL tags above, as they are the new standard (rather than using an old technology to do this)

Tim
0
 
bpmurrayCommented:
Tex Texin, an old friend of mine, has a web site with a bunch of stuff on this subject - have a look at http://www.i18nguy.com/
0
 
chainreactionAuthor Commented:
Tim, i understand your point. But with the design that i am using now, can i incooperate the JSTL in? I means can JSP and Servelt work with JSTL??

Can refer me more on JSTL fundamental and knowledge about it? I am zero knowledge for that.. JSTL..

thanks.
0
 
TimYatesCommented:
Any JSP tags (JSTL included, as well as those i18n tags you linked to) are designed to work in JSPs

Depending on which version of Tomcat you are using, it can change the way you declare them slightly, but basically you;

1)  Declare them in the web.xml
2)  Then declare them at the top of the JSP you want to use them in
3)  Use them

JSP tags don't work in Servlets though, then you are back to using a resourceBundle as I pointed to here http:Q_21901731.html#16999864

This shows how to install JSTL with Tomcat 4 http://www.javaworld.com/javaworld/jw-02-2003/jw-0228-jstl.html

I believe with Tomcat 5, they should already be there...
0
 
chainreactionAuthor Commented:
Tim, thanks for your information.

appreciate that.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 5
  • 4
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now