cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sjur Nørstebø Moshagen <>
Subject Re: [RT] Document based I18n sites with Cocoon
Date Fri, 09 Jul 2004 11:10:58 GMT

På 9. jul. 2004 kl. 13.57 skrev Sjur Nørstebø Moshagen:

> På 9. jul. 2004 kl. 13.12 skrev Upayavira:
>> The way it is currently coded, if de_AU was not found, it wouldn't 
>> find de. Which is not ideal. I'll extend it so that for ru_EE-KOI8 it 
>> will try:
>> * ru_EE-KOI8
>> * ru_EE
>> * ru
>> in turn. Is that the correct behaviour?
> Yes.

Please note that the exact format of the locale string may vary a bit 
from browser to browser, but IIRC Cocoon normalizes the incoming locale 
requests to one standardized format for internal use. The above 
examples are most likely NOT in accordance with that standard.

I don't know whether Cocoon is presently actually obeying content 
negotiation regarding encoding requests, but your proposal will make 
this possible/more straightforward/whatever (using {encoding}), which 
is also very nice;) Extending on your sitemap snippet:

<map:match pattern="**.html">
  <map:match type="i18n" src="content/*/{1}.xml">
    <map:generate src="{source}"/>
    <map:transform src="foo.xsl"/>
    <map:transform type="i18n">
      <map:parameter name="locale" value="{locale}"/>
    <map:serialize type="html" encoding="{encoding}"/>  <== support for 
negotiated encoding!


View raw message