cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@stjude.org>
Subject RE: I18N and multiple source files
Date Mon, 15 Mar 2004 16:36:43 GMT
Upayavira <uv@upaya.co.uk> writes:

<snip/> 

> Therefore, I think we need an I18N input module. It would do 
> something like:
> 
> <map:match pattern="**/*.html">
>   <map:generate src="{1}/{i18n:{2}.{locale}.xml"/>
>   ...
> </map:match>
> 
> [NB. I'm not sure if nested input modules are allowed, so the syntax 
> might need to change, but the idea should be sound]
> 

I believe what you want is:

<map:generate src="{1}/{i18n:{2}}.{locale}.xml"/>

Or

<map:generate src="{1}/{i18n:{2}.{locale}}.xml"/>

? (Note the extra }) In any case, that currently doesn't work.  You can
specify:

   <map:generate src="{1}/{i18n:2}.{locale}.xml"/>

Which results in the value of {2} being substituted after the module
returns so that the value isn't passed to the module but rather down
stream, to the consumer of the module output, which seems rather useless
to me, in particular if the module is outputting XML.

I also have a need for this general pattern, but a quick look at the
code did not reveal any easy way to do this.  If you come up with
something please post your solution. :-)  We just made a hard coded
assumption that so far works for all our use-cases...

<snip/>



Mime
View raw message