forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: [I18n] Alternatives locales for a given page.
Date Tue, 27 Apr 2004 19:03:34 GMT
Juan Jose Pablos wrote:

> Upayavira,
>
>>> Just curious: how is it going?
>>
>>
>>
>> Oh. Done. Recursive input module support is now in Cocoon CVS.
>>
>> I'm now trying to get my head around encoding - my first language is 
>> Polish. Once I've got that sorted, I'll be looking at how to get 
>> navigation between languages working.
>>
>> Regards, Upayavira
>>
>
> Could you post more info on how to use it?
>
> I can test if we can use it with latest cocoon.

Well, the nested input module support isn't that spectacular, it just 
means you can do {request-param:{1}}, for example, which you couldn't do 
before.

Here's some further thoughts, had during a nice warm bath:

The below assumes that the content is stored in the following structure:

/xml/en/*.xml
/xml/de/*.xml
/xml/pl/*.xml

Syntax isn't quite right yet, but the idea is there:

<!-- This one handles urls like www.host.com/en/foo.html -->
<map:match type="locale" pattern="*/**.html">
  <map:generate src="xml/{1}/{2}.xml"/>
  ...
</map:match>

<!--This one handles urls like en.host.com/foo.html -->
<map:match type="host" pattern="*.host.com">
  <map:match pattern="**.html">
    <map:generate src="xml/{../1}/{1}"/>
    ...
  </map:match>
</map:match>

<!-- This one handles urls like www.host.com/foo.html, using the locale to
        identify which language, with appropriate fallback -->
<map:match pattern="**.html">
  <map:generate src="{i18n:xml/LOCALE/{1}.xml"/>
   ...
</map:match>

This _should_ be compatible with the CLI and Apache, I think.

What do you think?

Regards, Upayavira



Mime
View raw message