Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 97043 invoked by uid 500); 28 May 2003 08:56:39 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 96616 invoked from network); 28 May 2003 08:56:34 -0000 Received: from smtp-relay01.x-mailer.co.uk (212.69.217.30) by daedalus.apache.org with SMTP; 28 May 2003 08:56:34 -0000 Received: from [212.69.205.254] (helo=codeconsult.dsvr.co.uk) by smtp-relay01.x-mailer.co.uk with esmtp (Exim 4.12) id 19Kwji-0003cq-00 for cocoon-dev@xml.apache.org; Wed, 28 May 2003 09:56:42 +0100 Received: from codeconsult.ch ([62.220.137.25]) by codeconsult.dsvr.co.uk (8.11.7/8.11.7) with ESMTP id h4S8uYS04052 for ; Wed, 28 May 2003 09:56:34 +0100 Date: Wed, 28 May 2003 10:56:44 +0200 Subject: Re: Customization (ResourceSelectorAction?) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Bertrand Delacretaz To: cocoon-dev@xml.apache.org Content-Transfer-Encoding: quoted-printable In-Reply-To: Message-Id: <4E813B62-90EA-11D7-8BCB-000393CFE402@codeconsult.ch> X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Le Mercredi, 28 mai 2003, =E0 09:28 Europe/Zurich, Mato Mira, Fernando a=20= =E9crit : > ...There is a fallback mechanism whereby when the framework looks for=20= > some > page foo the following search will be performed (say the user has=20 > Spanish in > his preferences): > > foo_hisproduct_sp.html > foo_hisproduct_en.html (English, the defauult) > foo_dsp_sp.html (dsp is the default product) > foo_dsp_en.html... You could implement a ResourceSelectorAction that goes through the=20 possible file paths and names, based on the input page name, product=20 name and a configurable ordered list of languages. Using java=20 MessageFormats to build filenames could make it configurable for=20 different file selection schemes. The action's output would be the name of the selected file. I don't think something already exists that does exactly that in Cocoon=20= (but one is often proven wrong when making such statements here ;-), =20 you could probably use resource-exists but it might get ugly if you=20 have a lot of possible languages. -Bertrand=