You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Søren Krum <so...@uninett.no> on 2009/05/19 16:14:29 UTC
Forms and locale
Hi!
I use some fine forms in cocoon 2.1, nice feature, but now i am a little
trapped, maybe someone has an idea where to look:
I have some fields like that one:
<fd:field id="ved" state="output">
<fd:datatype base="double" />
<fd:initial-value>3000</fd:initial-value>
</fd:field>
and if i reference them in the template like e.g <ft:widget id="ved" />
i get something like 3,000 as result in the html file.
How does i change teh comma in a dot (yes, there are some countries
using . here...), or may be even better, get rid of the thousend-symbol
at all.
I tried out to set the Form.language in the js file and do a i18n
transformation, but it looks like that had no effect. Any other ideas?
Best regards
--
Søren D. Krum
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Forms and locale
Posted by Fabrizio Sitzia <fa...@chem.lu>.
Hello
I got rid of the commas/dots by specifying the 'plain' convertor:
<fd:datatype base="long">
<fd:convertor type="plain"/>
</fd:datatype>
It should work with doubles too.
Fabrizio
> Hi!
>
> I use some fine forms in cocoon 2.1, nice feature, but now i am a little
> trapped, maybe someone has an idea where to look:
>
> I have some fields like that one:
> <fd:field id="ved" state="output">
> <fd:datatype base="double" />
> <fd:initial-value>3000</fd:initial-value>
> </fd:field>
>
> and if i reference them in the template like e.g <ft:widget id="ved" />
> i get something like 3,000 as result in the html file.
>
> How does i change teh comma in a dot (yes, there are some countries
> using . here...), or may be even better, get rid of the thousend-symbol
> at all.
>
> I tried out to set the Form.language in the js file and do a i18n
> transformation, but it looks like that had no effect. Any other ideas?
>
> Best regards
>
> --
>
> Søren D. Krum
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
-------------------------------------------------
Sitzia Fabrizio email: fabrizio.sitzia@chem.lu
Centre Hospitalier Emile Mayrisch
Service Informatique
rue Emile Mayrisch bp 436 L-4005 Esch/Alzette
Tel: +352 5711 80328 Fax: +352 5711 69439
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org