Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 35201 invoked from network); 15 Jan 2006 22:58:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Jan 2006 22:58:36 -0000 Received: (qmail 76151 invoked by uid 500); 15 Jan 2006 22:58:23 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 76132 invoked by uid 500); 15 Jan 2006 22:58:23 -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 List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 76120 invoked by uid 99); 15 Jan 2006 22:58:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Jan 2006 14:58:23 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [193.213.115.42] (HELO mail42.e.nsc.no) (193.213.115.42) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Jan 2006 14:58:22 -0800 Received: from steinar (062016173163.customer.alfanett.no [62.16.173.163]) by mail42.nsc.no (8.13.5/8.13.5) with ESMTP id k0FMvxlH016987 for ; Sun, 15 Jan 2006 23:57:59 +0100 (CET) From: Steinar Jonsson To: users@cocoon.apache.org Subject: Re: CForms, double-listbox and i18n. Date: Mon, 16 Jan 2006 00:02:43 +0100 User-Agent: KMail/1.5.4 References: <200601150119.59802.sjonsson@online.no> <200601152217.12036.sjonsson@online.no> <43CAC733.4050007@lojjic.net> In-Reply-To: <43CAC733.4050007@lojjic.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601160002.43035.sjonsson@online.no> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Sunday 15 January 2006 23:05, Jason Johnston wrote: > Steinar Jonsson wrote: > >>> SelectableWidget widget = > >>>(SelectableWidget)form.getChild(widgetName); > >>>widget.setSelectionList(listOfLabelAndValuePairs, "value", "label"); > >> > >>I believe that if the value of the "label" path is a > >>org.apache.cocoon.forms.util.I18nMessage (see the javadocs) then it will > >>write out the label surrounded by the appropriate i18n tags. > > > > I may be wrong, but I somehow got the impression that would only work > > if the entire label text is an i18n key. In my case each label typically > > has a prefix part that should be translated and a name part that should > > not. > > You are correct for basic form of I18nMessage. However it also provides > special constructors for passing parameters. So you could pass the > parts that shouldn't be translated as parameters which would get > substituted into the final string. > > String[] params = {"Jason", "Steinar"}; > I18nMessage msg = new I18nMessage("Message_Key", params); > > {0} hopes this helps {1}. > Yes! That looks like exactly what I need! Many thanks! Steinar, busy writing "read the docs" a hundred times --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org