Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 76240 invoked from network); 11 May 2004 14:08:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 11 May 2004 14:08:58 -0000 Received: (qmail 39895 invoked by uid 500); 11 May 2004 14:09:55 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 39815 invoked by uid 500); 11 May 2004 14:09:55 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 39777 invoked by uid 98); 11 May 2004 14:09:55 -0000 Received: from askild@xangeli.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(80.89.32.22):. Processed in 0.980551 secs); 11 May 2004 14:09:55 -0000 X-Qmail-Scanner-Mail-From: askild@xangeli.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(80.89.32.22):. Processed in 0.980551 secs) Received: from unknown (HELO mail.itconnect.no) (80.89.32.22) by hermes.apache.org with SMTP; 11 May 2004 14:09:53 -0000 Received: from askilddell (sinas.sdsl-rgn.isk-tv.no [80.89.35.120]) by mail.itconnect.no (8.12.8/8.12.8) with ESMTP id i4BE8Skh021099 for ; Tue, 11 May 2004 16:08:28 +0200 From: "Askild Aaberg Olsen" To: Subject: Re: Cocoon and Internationalization Date: Tue, 11 May 2004 16:08:17 +0200 Message-ID: <002b01c43761$68adea00$2201a8c0@askilddell> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_002C_01C43772.2C36BA00" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 In-Reply-To: <40A0D919.1060407@upaya.co.uk> X-ITCMAIL-MailScanner-Information: Denne e-posten har passert itConnect AS sin virus vask (internett@itconnect.no) X-ITCMAIL-MailScanner: Found to be clean X-MailScanner-From: askild@xangeli.com X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_002C_01C43772.2C36BA00 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Upayavira wrote: > Askild Aaberg Olsen wrote: > >This is actually my current approach, but implemented with sitemap=20 > >parameters, a stylesheet and cinclude. > > > > > > > > > > > > > > value=3D"{request-param:lang}"/> > > > > > > > > > > > > > >The stylesheet implements the selection logic to find the=20 > correct file,=20 > >and if it doesn't find it, serves the closest match. > > =20 > > > Now that is interesting. If you instead did: >=20 > > > value=3D"{request-param:lang}"/> > value=3D"{locale:lang}"/> > > > >=20 > You would be able to code your stylesheet to handle the=20 > locale provided=20 > by the user's browser, not just a request parameter. Nice one, but in my case this sitemap is actually called from another pipeline, that provides the actual lang request-parameter. I have a = separate piece logic to work out the right locale (not only based on the users locale). > Would you be willing to post (or send me privately) your stylesheet as = it currently stands? Of course! I rely on your and the Cocoon community's work all day long, so it's = just decent to give something back. The filename pattern is _., and the idea is to take = the file with the longest -string that matches the complete or partial language. If no match is found, just produce the last one (wich is also the = default language, usually english or norwegian (!) for norwegian only sites. > >It works, but it's not rock-solid. > > > It looks good to me, so far. Thanks, but you haven't seen the stylesheet yet ;) That's the weak link, since it's not able to compute the 100% correct language. But it's still good enough for me, event if it doesn't work for all = cases.=20 > >A cocoon component that implements this > >would be really useful! > > =20 > > > Yea. But there's also something to be said for the simple component=20 > approach that you've taken. I'll mull on this more. >=20 > Regards, Upayavira Regards, Askild ------=_NextPart_000_002C_01C43772.2C36BA00 Content-Type: text/xml; name="match.lang.xslt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="match.lang.xslt" ------=_NextPart_000_002C_01C43772.2C36BA00 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org ------=_NextPart_000_002C_01C43772.2C36BA00--