You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dan Ochs <da...@gmail.com> on 2005/07/08 19:33:19 UTC

CForms javascript ValidationError i18n Translations

Hi, I have two related questions:
1. I'm trying to get translations working and would like to use the
CForm block Locales Flowscript samples as examples, but all of them
seem to come back in english.  I am running 2.1.7 default
installation.  Is this something that will be added later, is there an
easy fix to get it to work?  I'm assuming this just wasn't finished in
time for the 2.1.7 release?

2. I have translations working so far with cforms except for
javascript validation.  I currently have something like the following
code in my form.xml, but the result is an empty string in the html. 
Is there an example of how to do this somewhere?

thanks!
dan


<fd:validation>
   <fd:javascript>
      widget.setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError("<i18n:text>select_all_error_msg</i18n:text>",
false));
   return success;
   </fd:javascript>
</fd:validation>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: CForms javascript ValidationError i18n Translations

Posted by Carlos Chávez <cc...@agssa.net>.
Dan Ochs wrote:

>Hi, I have two related questions:
>1. I'm trying to get translations working and would like to use the
>CForm block Locales Flowscript samples as examples, but all of them
>seem to come back in english.  I am running 2.1.7 default
>installation.  Is this something that will be added later, is there an
>easy fix to get it to work?  I'm assuming this just wasn't finished in
>time for the 2.1.7 release?
>
>2. I have translations working so far with cforms except for
>javascript validation.  I currently have something like the following
>code in my form.xml, but the result is an empty string in the html. 
>Is there an example of how to do this somewhere?
>
>thanks!
>dan
>
>
><fd:validation>
>   <fd:javascript>
>      widget.setValidationError(new
>Packages.org.apache.cocoon.forms.validation.ValidationError("<i18n:text>select_all_error_msg</i18n:text>",
>false));
>  
>
    Hi.
try this:

widget.setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError("i18n key", true));

where "i18n key" are the message key.

Cheers.
Carlos Chávez.

>   return success;
>   </fd:javascript>
></fd:validation>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org