You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ma...@yahoo.com on 2009/11/27 21:53:40 UTC
textfield label localized
Hi,
Can someone tell me how to make the label use my resource bundle value? I've tried this
<s:textfield label="label.name" name="user.name" maxlength="35" theme="xhtml"/>
and
<s:textfield label="%{getText(label.name)}" name="user.name" maxlength="35" theme="xhtml"/>
both are not working.
But this work:
<s:label key="label.name"/>
in my resource bundle properties file
I've this
label.name = Name
THanks
L.V
Re: textfield label localized
Posted by Saeed Iqbal <sa...@gmail.com>.
No Problem :)
On Saturday, November 28, 2009, <ma...@yahoo.com> wrote:
> Hi,
>
> Thanks for the answer, both are working now.
>
>
> Regards
> LV
>
>
>
> ________________________________
> From: KamHon Eng <ka...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Sat, November 28, 2009 9:41:32 AM
> Subject: Re: textfield label localized
>
> <s:textfield label="%{getText('label.name')}" name="user.name"
> maxlength="35" theme="xhtml"/>
> or
> <s:textfield key="label.name" name="user.name" maxlength="35" theme="xhtml"/>
>
> shoud working
>
> On Sat, Nov 28, 2009 at 4:53 AM, <ma...@yahoo.com> wrote:
>> Hi,
>>
>> Can someone tell me how to make the label use my resource bundle value? I've tried this
>> <s:textfield label="label.name" name="user.name" maxlength="35" theme="xhtml"/>
>> and
>> <s:textfield label="%{getText(label.name)}" name="user.name" maxlength="35" theme="xhtml"/>
>> both are not working.
>>
>> But this work:
>> <s:label key="label.name"/>
>>
>> in my resource bundle properties file
>> I've this
>> label.name = Name
>>
>> THanks
>>
>> L.V
>>
>
>
>
> --
> Best Regard,
>
> Kam Hon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
--
Saeed Iqbal
http://www.iqbalconsulting.com
Struts - J2EE - Application Architect / Developer
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: textfield label localized
Posted by ma...@yahoo.com.
Hi,
Thanks for the answer, both are working now.
Regards
LV
________________________________
From: KamHon Eng <ka...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Sat, November 28, 2009 9:41:32 AM
Subject: Re: textfield label localized
<s:textfield label="%{getText('label.name')}" name="user.name"
maxlength="35" theme="xhtml"/>
or
<s:textfield key="label.name" name="user.name" maxlength="35" theme="xhtml"/>
shoud working
On Sat, Nov 28, 2009 at 4:53 AM, <ma...@yahoo.com> wrote:
> Hi,
>
> Can someone tell me how to make the label use my resource bundle value? I've tried this
> <s:textfield label="label.name" name="user.name" maxlength="35" theme="xhtml"/>
> and
> <s:textfield label="%{getText(label.name)}" name="user.name" maxlength="35" theme="xhtml"/>
> both are not working.
>
> But this work:
> <s:label key="label.name"/>
>
> in my resource bundle properties file
> I've this
> label.name = Name
>
> THanks
>
> L.V
>
--
Best Regard,
Kam Hon
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: textfield label localized
Posted by KamHon Eng <ka...@gmail.com>.
<s:textfield label="%{getText('label.name')}" name="user.name"
maxlength="35" theme="xhtml"/>
or
<s:textfield key="label.name" name="user.name" maxlength="35" theme="xhtml"/>
shoud working
On Sat, Nov 28, 2009 at 4:53 AM, <ma...@yahoo.com> wrote:
> Hi,
>
> Can someone tell me how to make the label use my resource bundle value? I've tried this
> <s:textfield label="label.name" name="user.name" maxlength="35" theme="xhtml"/>
> and
> <s:textfield label="%{getText(label.name)}" name="user.name" maxlength="35" theme="xhtml"/>
> both are not working.
>
> But this work:
> <s:label key="label.name"/>
>
> in my resource bundle properties file
> I've this
> label.name = Name
>
> THanks
>
> L.V
>
--
Best Regard,
Kam Hon
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: textfield label localized
Posted by ma...@yahoo.com.
Hi,
Thanks, its work now by using key.
Regards
LV
________________________________
From: Saeed Iqbal <sa...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Sat, November 28, 2009 1:54:48 AM
Subject: Re: textfield label localized
There are 2 ways to go about this
1) within Struts tags
use key=""
where your i8nl key should go in.
But for that to work your struts needs to know where all the i8nl values are
located.
Define a constant for it in struts.xml
or create a struts.properties to contain this
struts.custom.i18n.resources=package
where my i8nl file is called package.properties located in the same folder
where struts.xml is present
2) use fmt tag
JSTL tag for i8nl
<fmt:message key="authGroups.addTitle"/>
Make sure the jstl jar(s) are on your dependency list.
On Sat, Nov 28, 2009 at 1:53 AM, <ma...@yahoo.com> wrote:
> Hi,
>
> Can someone tell me how to make the label use my resource bundle value?
> I've tried this
> <s:textfield label="label.name" name="user.name" maxlength="35"
> theme="xhtml"/>
> and
> <s:textfield label="%{getText(label.name)}" name="user.name"
> maxlength="35" theme="xhtml"/>
> both are not working.
>
> But this work:
> <s:label key="label.name"/>
>
> in my resource bundle properties file
> I've this
> label.name = Name
>
> THanks
>
> L.V
>
--
Saeed Iqbal
http://www.iqbalconsulting.com
Struts - J2EE - Application Architect / Developer
Re: textfield label localized
Posted by Saeed Iqbal <sa...@gmail.com>.
There are 2 ways to go about this
1) within Struts tags
use key=""
where your i8nl key should go in.
But for that to work your struts needs to know where all the i8nl values are
located.
Define a constant for it in struts.xml
or create a struts.properties to contain this
struts.custom.i18n.resources=package
where my i8nl file is called package.properties located in the same folder
where struts.xml is present
2) use fmt tag
JSTL tag for i8nl
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:message key="authGroups.addTitle"/>
Make sure the jstl jar(s) are on your dependency list.
On Sat, Nov 28, 2009 at 1:53 AM, <ma...@yahoo.com> wrote:
> Hi,
>
> Can someone tell me how to make the label use my resource bundle value?
> I've tried this
> <s:textfield label="label.name" name="user.name" maxlength="35"
> theme="xhtml"/>
> and
> <s:textfield label="%{getText(label.name)}" name="user.name"
> maxlength="35" theme="xhtml"/>
> both are not working.
>
> But this work:
> <s:label key="label.name"/>
>
> in my resource bundle properties file
> I've this
> label.name = Name
>
> THanks
>
> L.V
>
--
Saeed Iqbal
http://www.iqbalconsulting.com
Struts - J2EE - Application Architect / Developer