You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by alex zaim <ic...@yahoo.com> on 2011/04/13 14:38:00 UTC

How to i18n post validation error messages?

Please suggest the best method, if possible. (perhaps from right within validate() method? should i make my own resource parser in this case?)

Re: How to i18n post validation error messages?

Posted by Dave Newton <da...@gmail.com>.
On Wed, Apr 13, 2011 at 9:52 AM, alex zaim wrote:
> When you said getText() i thought you meant <s:property value="getText('some.key')" />
>
> It works all good now when i use it from validate().
>
> Thanks a lot!

No problem!

Dave

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


Re: How to i18n post validation error messages?

Posted by alex zaim <ic...@yahoo.com>.
When you said getText() i thought you meant <s:property value="getText('some.key')" />

It works all good now when i use it from validate().

Thanks a lot!

Re: How to i18n post validation error messages?

Posted by Dave Newton <da...@gmail.com>.
On Wed, Apr 13, 2011 at 9:01 AM, alex zaim <ic...@yahoo.com> wrote:
>>No. Use existing getText(...) methods.
>
> That will be parsed right before validation. I want to show the fielderror results...
> in another language.

I don't understand what you're saying.

If you're doing validation in validate(). getText(...) is I18Nized.
Whether you do the validation via XML, validate(), or both, the keys
will access your I18N resource files.

Dave

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


Re: How to i18n post validation error messages?

Posted by alex zaim <ic...@yahoo.com>.
>No. Use existing getText(...) methods.

That will be parsed right before validation. I want to show the fielderror results... in another language.

Re: How to i18n post validation error messages?

Posted by Dave Newton <da...@gmail.com>.
On Wed, Apr 13, 2011 at 8:38 AM, alex zaim <ic...@yahoo.com> wrote:
> Please suggest the best method, if possible. (perhaps from right within validate() method?
> should i make my own resource parser in this case?)

No. Use existing getText(...) methods.

Dave

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