Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

[S2] Internationalisation of conversion type messages

Dariusz Wojtas

2007-01-14

Replies:

Hi,

Can someone help me figure out how to translate into my language field
names that have type conversion problems?

I have a Double field and put value: aa - obvious error.
Struts prints message:
 Invalid field value for field "myBean.myProperty".

I would like to change it to:
 Invalid field value for field "Translated field name".

I tried to put property
  invalid.fieldValue.myBean.myProperty=Translated field name
into files:
a) MyActionName.properties  (in the same package as the action being invoked)
b) package.properties (the same package)
c) define custom i18.properties file and define it in struts.properties

but none of these solutions work.
Other messages get translated but not these from type conversion.

And how to translate the
 Invalid field value for field {0}.
message?

Any help?

regards
Dariusz Wojtas

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.