Reputation: 59
I have defined a form with currency controls and need to use a comma ',' as decimal separator. I have set the decimal separator (,) and grouping separator (.) in properties-local.xml accordingly (see details below).
When I enter a number without a comma, Orbeon accepts it and formats it as expected.
E.g., "15" becomes "€ 15,00".
However, the form does not accept input with a "," in it.
E.g., "15,00" leads to a validation error.
Inputting "15.00" is accepted, but incorrectly formatted by the currency control, namely
"15.00" becomes "€ 1.500,00"
Orbeon seems not to recognize the "," as decimal separator when input to the currency control.
Have I missed to set some additional property or the like? How can I write currency values with decimal commas? Any suggestions or ideas how to make this work?
Excerpt from properties-local.xml:
<property as="xs:string" name="oxf.xforms.xbl.fr.currency.prefix" value="€"/>
<property as="xs:string" name="oxf.xforms.xbl.fr.currency.digits-after-decimal" value="2"/>
<property as="xs:string" name="oxf.xforms.xbl.fr.currency.decimal-separator" value=","/>
<property as="xs:string" name="oxf.xforms.xbl.fr.currency.grouping-separator" value="."/>
<property as="xs:string" name="oxf.xforms.xbl.fr.number.prefix" value=""/>
<property as="xs:string" name="oxf.xforms.xbl.fr.number.digits-after-decimal" value="2"/>
<property as="xs:string" name="oxf.xforms.xbl.fr.number.decimal-separator" value=","/>
<property as="xs:string" name="oxf.xforms.xbl.fr.number.grouping-separator" value="."/>
Upvotes: 1
Views: 316
Reputation: 59
So, finally I modified number.xbl
, and two small modifications in number.xbl
do the job for me.
number.xbl
here - git://gist.github.com/3636583.gitnumber.xbl
into folder resources/xbl/orbeon/number
Upvotes: 1