Changing the locale doesn't change the decimal separator

Viewed 838

I'd like to use the comma (,) instead of the dot (.) as decimal separator for inputText and outputText.

If I add a f:converterNumber with locale="es" to a inputText, it works:

<h:inputText id="myField" value="#{var.field}">
    <f:validateDoubleRange minimum="0.000000001" />
    <f:convertNumber locale="es" />
</h:inputText>

But I don't want to have to add this tag for every inputText and outputText in every view I create!

I tried setting "es_ES" (spanish from Spain) as default locale in faces-config.xml and the validation messages change to spanish, but the inputText still uses the dot as decimal separator.

I also tried wrapping the h:body tag with a <f:view locale="es_ES"></f:view>, but it doesn't work either.

1 Answers
Related