Thanks for your help Konstantin!
It's OK with LocaleAction.

Regards,
Cyril.
----- Original Message -----
From: "Konstantin Piroumian" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 31, 2003 4:12 PM
Subject: Re: How can the result of a pipeline be a parameter for a
transformation in another pipeline?


> From: "Cyril Vidal" <[EMAIL PROTECTED]>
>
> > Hello,
> >
> > I would like to retrieve the language of the user's browser, so that I
> could
> > call the I18n Trasnformer in the right way (by passing the locales's
value
> > equal to the browser's language).
>
> Simply use the LocaleAction as it is done in i18n samples.
> AFAIK, you can setup it to use only the browser's locale and not take into
> account request params, session attributes or cookies. But I'm sure you'll
> need to allow users to change to language on fly or retain it in a cookie
on
> the client side to serve the last preferred language of the user. In all
> this cases LocaleAction will help you a lot.
>
> -- Konstantin
>
> >
> > To retrieve the language set up in the browser, I've used the Request
> > Generator, and applied the following simple stylesheet to it:
> >
> > <xsl:stylesheet version="1.0"
> >
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> >
> > xmlns:req="http://xml.apache.org/cocoon/requestgenerator/2.0";
> >
> > >
> >
> > <xsl:template match="/">
> >
> > <xsl:value-of
> > select="//req:requestHeaders/req:header[@name='accept-language']"/>
> >
> > </xsl:template>
> >
> > </xsl:stylesheet>
> >
> >
> >
> > And this is working fine. By example, for my browser, the result is
'fr'.
> >
> > But now, I don't know what really to do with this value: I would like to
> use
> > it as a parameter for a I18nTransformation in another pipeline.
> >
> > Do you know how this can be achieved?
> >
> >
> >
> > Thanks for your help,
> >
> > Cyril.
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   <[EMAIL PROTECTED]>
> >
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to