Revision #7 was created by c@cba on Aug 1, 2012, 5:05:55 PM.
added related links. edited first paragraph (visible as summary in wiki-list) is clearer.
Content
By default, the decimal separator in php (also in mysql) is a dot (.).
So when we work with floats in Yii (in calculations, validation, sql statements etc.), the decimal separator has to be a dot.
If we want to use for example a comma (,) as the decimal separator in our application, that is if we want to display numbers and enable users to enter numbers with a comma before the decimals, we have to:...
1. format the float value before printing/echoing : handle the output : 4.45 => "4,45"
[...]
```
Related Links
-------------
- Wiki: [How to handle decimal separators (e.g comma instead of dot) for l18n](http://www.yiiframework.com/wiki/298/how-to-handle-decimal-separators-e-g-comma-instead-of-dot-for-l18n "How to handle decimal separators (e.g comma instead of dot) for l18n")
- Wiki: [How to extend CFormatter, add i18n support to booleanFormat and use it in CDetailView](http://www.yiiframework.com/wiki/305/how-to-extend-cformatter-add-i18n-support-to-booleanformat-and-use-it-in-cdetailview/ "How to extend CFormatter, add i18n support to booleanFormat and use it in CDetailView")
That's it. If something is unclear, wrong or incomplete, please let me know. Any suggestions for improvements will be appreciated!