cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: [RT] Document based I18n sites with Cocoon
Date Fri, 09 Jul 2004 14:16:58 GMT
Vadim Gritsenko wrote:

> Upayavira wrote:
>
>> Sjur Nørstebø Moshagen wrote:
>>
>>> På 9. jul. 2004 kl. 14.04 skrev Vadim Gritsenko:
>>>
>>>>> I guess the full list would be: {lang}, {country}, {encoding}, 
>>>>> {variant}, {full-locale}, {matched-locale}. {locale} could be a 
>>>>> shorthand for {full-locale}.
>>>>
>>>>
>>>>
>>>>
>>>> This list should be compatible with LocaleAction: language (not 
>>>> lang), country, variant.
>>>
>>>
>>>
>>>
>>> Agree.
>>>
>>>>>> Site default locale is defined within the config of the matcher 
>>>>>> at the top of the sitemap. It could easily be overridden with a 
>>>>>> <map:parameter name="default-locale" value="xxxx"/> within
the 
>>>>>> matcher itself.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> OK.
>>>>
>>>>
>>>>
>>>>
>>>> If no default is given, it should defaults to empty locale.
>>>
>>>
>>>
>>>
>>> Ok, but how do you decide which document version to serve then? Or 
>>> should Cocoon throw an error ("No resource found")?
>>>
>> Exactly, if no default is given, the matcher doesn't match.
>
>
>
> No, it should match document without locale - same behavior we have 
> now. Given your example:
>
> file.ru_EE-KOI8.xml
> file.ru_EE.xml
> file.ru.xml
> file.xml
>
> And if none of the files above are present, *then* it should not match.

Hmm. But the matcher says pattern="file.*.xml" where the * is the 
locale. Now file.xml cannot match that pettern.

So we'd need to build in a special case, which says something like, if 
the characters before and after the locale are the same, then only use 
one of those characters when looking for a default file.

This would allow it to cater for:

contents/ru_EE/file.xml
contents/file.xml

as well as your naming scheme above.

Does this seem reasonable?

Upayavira



Mime
View raw message