0

I'm trying to start my Play Application in Prodmode with SSL. The Problem is, that all the floats in the templates are shown with a dot and not with comma. In dev mode on locahost everything is fine.... So I wonder why the floats are shown diffent in prod mode. For the format I tried:

@{"%.2f".format(session.get("product."+product.id.toString).toFloat*product.vkBrutto)}

and

@String.format("%.2f",product.vkBrutto)

both ways show the wron format when I start the server in prodmode with ssl.

CrimsonKing
  • 95
  • 10

1 Answers1

1

I guess JVM locale differ, which impacts all Java formatting (date, number, ...). You could either enforce JVM global locale (setting system property), or using a NumberFormat inited explicitly with Locale instance (e.g. Locale.FRANCE ).

cchantep
  • 9,118
  • 3
  • 30
  • 41
  • Default Play JVM locale can be set passing system properties to Play run script ( http://stackoverflow.com/questions/8809098/how-do-i-set-the-default-locale-for-my-jvm ). – cchantep Jul 19 '14 at 14:42