Internationalization is commonly done within the database schema.
Translations are kept in a translation table off of the translated item.

For example, you have a PRODUCT table that consists of a PRODUCT ID and
possibly some other data that does not need to be translated (e.g.
"QUANTITY").  Then you might have a PRODUCT_TRANSLATE (many to one PRODUCT)
for each "source language".  The PRODUCT_TRANSLATE has a record for each
source language, and contains fields you need to 'localize' such as name,
descriptions, price, etc.

The servlet can access the data depending on the source language.  Where
XML/XSL can come in is that you have a different XSL file for each source
language.

so... //myserver.com/servlet/product?productid=1&sourcelang=en_us

could do a query SELECT PT.NAME, PT.PRICE, P.QUANTITY FROM PRODUCT_TRANSLATE
PT, PRODUCT P WHERE PT.sourcelang = 'EN_US' and PT.PRODUCT_ID = 1 AND
P.PRODUCT_ID = PT.PRODUCT_ID

and then could dynamically determine that the prod_en_us.xsl should be used
to transform the data in English.

Hope you get the idea
regards,
john d. haro


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Lokesh Aggarwal
Sent: Thursday, September 28, 2000 4:19 PM
To: [EMAIL PROTECTED]
Subject: A bit off-topic: i18n


Hello folks

I have a web site which runs on servlets and accesses data from Oracle and
generates XML from it. The servlet then applies xsl and presents HTML to
the user.

Now i am supposed to "Internationalize" the site. Can u suggest which is
the best way to do this?
Can it be done thru XSL? or should i do it thru servlet?

Thanks in Anticipation
******************************
Lokesh Aggarwal

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to