IIRC, you can use named parameters. If you want to keep the {name}, use 

label.welcome = Welcome {name}

<s:label key="label.welcome">
<s:param name="name">John</s:param>
</s:label>



On Mon, 2008-02-11 at 09:10 -0800, Chris Pratt wrote:
> Change your property to
> 
> label.welcome = Welcome {0}
> 
> Then you might try:
> 
> <s:label key="label.welcome">
>   <s:param>John</s:param>
> </s:label>
> 
> If that doesn't work, you should be able to use:
> 
> <label><s:text name="label.welcome"><s:param>John</s:param></s:text></label>
> 
>   (*Chris*)
> 
> On Feb 11, 2008 7:13 AM, hezjing <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > If I have a message defined in i18n properties file shown below,
> >
> >     label.welcome = Welcome ${name}
> >
> > How can I subsitute the variable "name" in the JSP?
> > I tried the following and obviously it doesn't work!
> >
> >     <s:label key="label.welcome">
> >     <s:param name="name">John</s:param>
> >     </s:label>
> >
> >
> > May be it is a good idea to describe the solution in
> > http://struts.apache.org/2.x/docs/localization.html?
> >
> >
> > --
> >
> > Hez
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to