You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Obster <mi...@obster.org> on 2009/01/23 13:30:10 UTC

I18N on labels of form

Hi,

I have a problem with internationalization the labels of a form.

Writing <s:textfield ... label="<s:property value="mystring" />" /> 
doesn't work. Is there a way to implement correct I18N on form labels?

Cheers,
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: I18N on labels of form

Posted by Michael Obster <mi...@obster.org>.
Thank you!

/Michael

Lukasz Lenart schrieb:
> 2009/1/23 Michael Obster <mi...@obster.org>:
>> Writing <s:textfield ... label="<s:property value="mystring" />" /> doesn't
>> work. Is there a way to implement correct I18N on form labels?
> 
> Use key attribute instead
> <s:textfield key="mystring" name="myProperty"/>
> 
> or you can use OGNL expression
> <s:textfield label="%{getText('mystring')}" name"myProperty"/>
> 
> 
> Regards


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: I18N on labels of form

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/1/23 Michael Obster <mi...@obster.org>:
> Writing <s:textfield ... label="<s:property value="mystring" />" /> doesn't
> work. Is there a way to implement correct I18N on form labels?

Use key attribute instead
<s:textfield key="mystring" name="myProperty"/>

or you can use OGNL expression
<s:textfield label="%{getText('mystring')}" name"myProperty"/>


Regards
-- 
Lukasz
http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org