cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geert Josten <Geert.Jos...@daidalos.nl>
Subject Re: Localization
Date Fri, 04 Mar 2005 10:03:46 GMT
> Instead of this, i would like to have a simple link like
> domain.de/de/index.html
> 
> 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:
> domain.de/de/basket.html
> domain.de/de/somthingelse.html

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>

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

or

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

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
the 
proper replacements..

Does this help?

Cheers

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


Mime
View raw message