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);
<message key="Message_Key">{0} hopes this helps {1}.</message>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]