One way you can do this is using property files.

Prop_ file name _ language code.properties

So for say  abc.jsp , you have abc_en.properties and abc_fr.properties.

At comple time the JSP calls a class you write at server which gives say <%
String languageCode  = ObjectName.getLaguageCode(param 1 ,param 2);  %>

Then all JSP elements are picked from there.
Thanks
Tript Singh

----- Original Message -----
From: "Stephen Riek" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Sunday, November 24, 2002 6:42 PM
Subject: help with multilingual JSP sites pls. using a Filter to rewrite the
URL ?


>
> I'd like for a request to "<webapp>/en/Folder/File" to be
> sent to "<webapp>/Folder/File" but with a parameter 'lang'
>  set to 'en'.
>
> Likewise, a request to "<webapp>/fr/Folder/File" to be
> sent to "<webapp>/Folder/File" but with a parameter 'lang'
> set to 'fr'.
>
> Is this possible with Filters?
>
> If not, is there any way to accomplish this within Tomcat
> so that it works for any number of directories and
> subdirectories. The reason I want to do this is to avoid
> copying/pasting an entire sitemap to support a
> second language - I know that some people create a site
> in English then copy/paste the directory tree into another
> directory (eg. '/fr', '/de/', '/cn/') to support a
>  second language but this is not scalable and difficult to
> maintain. How do you circumvent doing such things ?
>
> Other mechanisms I've looked at are Apache rewrite rules
> but they're very complicated and I'd also like to make this
> work independent of Apache, and preferably for all servlet
> engines.
>
> Stephen.
>
>
>
>
>
> ---------------------------------
> With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits
your needs
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to