cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geert Josten <>
Subject Re: Localization
Date Fri, 04 Mar 2005 10:03:46 GMT
> Instead of this, i would like to have a simple link like
> This link is pointing to the sitemap at /.
> I can get the /de/ as parameter. I will not store it in a session,
> the link must always have /de/ in the middle, like:

To give you an idea, you could do something like:

<match pattern="*/**.html">
   <generate src="cocoon:/content/{1}/{2}.xml" />
   <!-- transformation to html -->
   <serialize type="html" />

<match pattern="content/**.xml">
   <generate src="{path to content}/{1}.xml"/> <!-- content gathered in subdirs that
match the 
language code -->
   <serialize type="xml" />


<match pattern="content/de/**.xml">
   <generate src="{path to german content}/{1}.xml"/>
   <serialize type="xml" />
<match pattern="content/en/**.xml">
   <generate src="{path to english content}/{1}.xml"/>
   <serialize type="xml" />

or use a selector to select the proper path to generate...

But actually, it would be nicer if you could use the i18n transformer. You generate html that

contains i18n placeholders for all language-dependent strings or values and use the i18n transformer

to replace them, passing the language parameter 'de' or 'en' (or other) to the i18n to select
proper replacements..

Does this help?


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

View raw message