cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <KPiroum...@flagship.ru>
Subject Re: Calling a logic-sheet using a parameter
Date Fri, 27 Apr 2001 13:18:25 GMT
Hi!
To use a parameter inside your logicsheet you have to use either request
taglib or do it manualy:
String lang = request.getParameter("lang");
if (lang != null) {
    translate(lang);
}

Something like that.
Personally, I use FP taglib for translation and use the lang attribute from
session (or request) to get the appropriate node from the dictionary.

Another (and, IMO, better) way to do translations is to use the Infozone
Group's I18nProcessor (http://www.infozone-group.org).

Regards,
    Konstantin Piroumian.
>
> Hi there,
>
> Cocoon 1.8.2.
>
> My cocoon pipline is as follow:
>
> <?xml version="1.0"?>
> <?xml-logicsheet href="../LogicSheets/TLUtils.xsl"?>
> <?xml-logicsheet href="../LogicSheets/TLsystem.xsl"?>
> <?cocoon-process type="xsp"?>
> <?xml-logicsheet href="../Translate/translate.xsl"?>
> <?cocoon-format type="text/html"?>
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="../Stylesheets/default.xsl" type="text/xsl"?>
>
> My question is regarding the "translate.xsl" bit that is called after XSP.
> Basically this template filters' all the XML tags produced that have a
> lang="en" parameter returns their equivalent value from a XML dictionary
> file in the required language "fr", "it", etc...
>
> It work fine and this is a nice way of doing transaltion!
>
> Thus what I want is to pass a parameter to this logicsheet "fr", "it",
> etc... An I don't know how to do this using cocoon.
>
> I am reading faqs and docs but so far nada...
>
> Could someone put me on the right direction ?
>
> Tony.
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>

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

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message