forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Jose Pablos <>
Subject Re: [I18n] Alternatives locales for a given page.
Date Wed, 24 Mar 2004 10:10:13 GMT

The idea is:

<map:match pattern="*.html">
         <map:aggregate element="site">
           <map:part src="cocoon:/tab-{0}"/>
           <map:part src="cocoon:/menu-{0}"/>
           <map:part src="cocoon:/body-{0}"/>
           <map:part src="cocoon:/i18n-{0}"/>


       <map:act type="locale" >
       <map:match pattern="**i18n-*.*">
       <map:generate type="directory" src="{project:content.xdocs}{1}">
         <map:parameter name="dateFormat" value="yyyy-MM-dd hh:mm" />
         <map:parameter name="include" value="^{2}" />
         <map:parameter name="exclude" value="^{2}\.|{2}_{../lang}" />
       <map:transform src="{forrest:stylesheets}/directory2i18n.xsl">
         <map:parameter name="ext"    value="{3}" />
       <map:transform type="i18n">
         <map:parameter name="locale" value="{../lang}"/>
       <map:serialize type="xml"/>

You can see the xsl code here:

I hope this helps.

Upayavira wrote:
> I've started working on making recursive input modules work, so we could 
> do <map:generate src="{i18n: index.{locales}.xml}"/>, which would find 
> the most appropriate file, given a list of locales.
>> Otherwise, your code seems to be what we want for the language 
>> menu/section - it can easily be extended/moulded in different 
>> directions for various needs and displays. One step forward - thanks 
>> Cheche! 
> How can I see this code without learning Forrest? Can you point me to a 
> viewcvs/svn link for it? I am curious.
> Regards,. Upayavira

View raw message