cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <>
Subject Re: Can the sitemap pass parameters to XSP, like it passes them to XSL?
Date Fri, 10 Aug 2001 06:25:34 GMT
> Hello.
> I'm trying to figure out an architecture for a multilingual site. One of
> ideas, that seem pretty nice, is described by the sitemap code:
>    <map:match pattern="en/*.html">
>     <map:generate type="serverpages" src="sources/{1}.xsp">
>       <map:parameter name="lang" value="en"/>
>     </map:generate>
>     <map:transform src="stylesheets/en/{1}.xsl">
>     </map:transform>
>     <map:serialize type="html"/>
>    </map:match>
> That would create a "virtual" subdirectory "en", and all the page requests
> in that dir will in fact execute a .xsp file (the same for all the
> languages) and apply a different logicsheet, stored in different dirs, one
> for each language.
> The problem is that I'm unable to get the value of the "lang" parameter in
> my xsp pages...

Why don't you use LocaleSelect action? This will allow you to get the 'lang'
parameter from the request  attributes and use it (session and cookies are
also supported).

> In xsl, you would normally use <xsl:param>, but here... I have no idea.
> Is this idea totally wrong, or can someone give me a sollution to the
> problem?
> In any case, did anybody devised a way to build multilanguage sites (other
> than the i18n internationalisation taglib, which is great for text in the
> page, but not for layout, or if the site is full of images).

Do you have any suggestions how i18n transformer can be advanced to meet
your needs?
What's is the problem with images? You can use different directories for
your locale-sensitive images and use i18n taglib to specify the path. Note,
that you can use i18n attributes in your XSP source:

<img src="hello.gif" i18n:attribute="src" />

and have this in your dictionary:

    <translation locale="en_US">en/hello.gif</translation>
    <translation locale="en_GB">en/hellow.gif</translation>
    <translation locale="ru">ru/hello.gif</translation>

What else do you need for images? Any ideas are appreciated.

> Thanks in advance,
> Tibi Dondera

Best regards,

Konstantin Piroumian
Senior software developer

Protek Flagship LLC
Phone: + 7 095 795 0520 (add. 1288)
Fax: + 7 095 795 0525

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message