Ticket #699 (closed defect: wontfix)
Support for localized float representation
| Reported by: | philipp | Owned by: | tof |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1.1 |
| Component: | Prado Framework v3 | Version: | 3.1 |
| Severity: | feature | Keywords: | |
| Cc: |
Description
I am currently working on a completely localized project and came across two minor things with localized floats: TDataTypeValidator does not account for them, if I specify type "Float" it always wants a dot ('.') as decimal separator. In German this is a comma (',') for example. The same is true for TPropertyValue::ensureFloat().
I attached two little patches that solve these two problems by looking at the current locale information for the decimal separator.
It would be great for these two patches to be incorporated into PRADO. They should not break any existing behavior, as the TDataTypeValidator has a new type "LocalizedFloat?" (thus the result with using the current type "Float" is the same). TPropertyValue::ensureFloat() still returns a float data type at all times, so the change shouldn't be too bad in terms of BC.
