You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andy Kriger <ak...@greaterthanone.com> on 2002/10/21 18:20:57 UTC
ChoiceFormat for message formatting?
Can ChoiceFormat be used to format messages in the app properties file?
For example, the validator error.maxlength is
{0} can not be greater than {1} characters.
This will produce '<field> can not be greater than 1 characters'
I am trying to use the ChoiceFormat to work so this can be grammatically
correct, but this is not working...
{0} can not be more than {1,choice,1#one character|1<{1,number,integer}
characters}.
Should it work? Do I have a format string problem?
thx
J2SE API for ChoiceFormat
http://java.sun.com/j2se/1.4.1/docs/api/java/text/MessageFormat.html
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>