Jan,

As I understood your question: you want multilingual support using only
JSP pages.

How about having a template page that has absolutely no text in it but
JSP tags and scriptlets.  The way it would work you would alias
Application_en.jsp and Application_fr.jsp to Application.jsp and then
see what was request for and do the whole page based on this.

You would load a languageBean first based on request's extension that
you have gotten in a scriptlet at the top of the page:
<jsp:useBean id=languageBean scope=page class=app.language.<%=
requestLanguage %>.AllData>

<html><head><title>
<jsp:getProperty name=languageBean property=Title>
</title><body bgcolor=FFFFF>
<jsp:getProperty name=languageBean property=WelcomeText>
...

where requestLanguage is what was parsed from request (en or fr).  So
you would be pulling app.language.[en|fr].AllData bean to use in the
page.  I don't know if that's possible even but if it is then that may
be a pretty good way.

For a complex html it is better than having many different laguage
versions of the same.  I do agree that sometimes it is impossible to
coordinate the length of words in different languages to the pages
design but it may be worth extra effort.

dave.

Jan de Rijke wrote:

> Anyone found an elegant way of doing multilingual jsp
> or should I stick to servlets for this?
>
> tnx,
>
> jan.
> --
>        Jan de Rijke          | Uniway
> email: [EMAIL PROTECTED] | L. Marelaan 12/1
> voice: +32-2-7136543         | B-1932 St Stevens Woluwe/Belgium
> fax:   +32-2-7136541         | www.uniway.be
> ----------------------------------------------------------------
> I want to die peacefully in my sleep, like my grandfather.
> Not screaming in agony, like his passengers.
>
>  Stolen signature

--
David Mossakowski        [EMAIL PROTECTED]
http://www.dwdog.com/styk      212.310.7275

"I don't sit idly by, I'm planning a big surprise"
F         U         G         A        Z        I

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to