You could use Cocoon for that (I can't be more specific than that though).

In general, to make an application multilingual, your best bet is to
"externalise all strings", as in "don't embed any language-specific
resources with your code".

If some language-specific data is stored in a database, you may for instance
wish to use an dependant table linked to a main table (in a one-to-many
relationship) to store your labels (not one column per language).

As for pages, you may wish to have many different versions of each page (one
per language).  You could do this with JSP, but try to avoid any code in the
page (use beans or taglibs), otherwise you'll find yourself with very
tedious cut-and-paste tasks for any maintenance or updates to embedded JSP
scriptlet code.

I would suggest perhaps using XSLT templates or some other templating system
for stroring presentation data. Given that in some cases this may use up a
lot of resources, you may wish to cache generated content for future
requests, but this is not very practical for highly dynamic or personalised
content.

For language codes, etc., check out the API javadoc for java.util.Locale as
this contains a lot of useful hints.  I recommend respecting language and
country codes defined therein.  You may also wish to look at the HTTP
"Accept-Language" header, as this can help determine the user's language
preferences (depends how well the browser is set up, so allow the user to
choose another language if he/she wants).

You could also check out java.util.PropertyResourceBundle or some of the
messaging resources in Jakarta Struts.

Hope this gets you going in the right direction!

-Chris


----- Original Message -----
From: "Thakkar yahoo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 12, 2001 10:31 AM
Subject: Multilingual WebSite


> Hello Everybody,
>
> I would like to display my website in diffrent languages. Atleast English,
> German ,French.
> Can anybody help be with that?
>
> I got to know that Cocoon can be used for that?
>
> But is it fine to use that?
>
> Thanks in advance.
>
> kaushal
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to