for custom validation messages you can do something like this:

<input jwcid="..." validators="validators:required[%your-message-key]"/>

note the % in front of the message key

read more here:
http://tapestry.apache.org/tapestry4.1/usersguide/validation.html

On Tue, 19 Dec 2006 11:22:31 +0100, Cyrille37 <[EMAIL PROTECTED]> wrote:

Marilen Corciovei a écrit :
In fact you don't need to overwrite the ValidationStrings.properties
which is supposed to be the default one. You just need to have the
ValidationStrings_{locale_code}.properties. In order to add french
validation to Tapestry I created a Tapestry-french-validation.jar in the
lib with the following content:

jar tvf Tapestry-french-validation.jar 0 Sun May 01 14:06:18 EEST 2005 META-INF/
   106 Sun May 01 14:06:16 EEST 2005 META-INF/MANIFEST.MF
     0 Sun May 01 14:06:18 EEST 2005 org/
     0 Sun May 01 14:06:18 EEST 2005 org/apache/
     0 Sun May 01 14:06:18 EEST 2005 org/apache/tapestry/
     0 Sun May 01 14:06:18 EEST 2005 org/apache/tapestry/valid/
   902 Sun May 01 14:06:18 EEST 2005
org/apache/tapestry/valid/ValidationStrings_fr.properties

Hello,
Thank you Len.

That is great for default validation messages translation, but not for 'custom' messages, isn't it ?

Cyrille.
Hope it helps,
Len

On Mon, 2006-12-18 at 22:27 +0100, Cyrille37 wrote:


Hello,

I was coming mad when trying to localize my validation messages.
After some search I've found a thread in that list which explain that:

[quote] That's because Tapestry looks for "username-not-unique" in the properties file bundeled with Tapestry. To override it, your ValidationStrings.properties should have this path
{CLASS_PATH_ROOT}/org/apache/tapestry/valid/ValidationStrings.properties.
To do that:
create the package /org/apache/tapestry/valid/ under your source folder and place your custom ValidationStrings.properties there.
[/quote]

Here there another way to localize validation messages ?
I hope there is a cleanest method.

How do you manage that case ?
Thanks
Cyrille

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to