ui
ui copied to clipboard
Add possibility to change Number formatting of Number Field
Hi, I want to add the ability to change the thousands seperator in Money FormField. e.g. in Germany, its a .
. PHP standard is a ,
.
PHP's number_format takes 2 or 4 parameters, with four both thousands seperator and decimal point:
https://www.php.net/manual/en/function.number-format.php
I think as there are already the properties currency
and currency_decimals
in Persistence/UI, its best to put two additional properties there and use them in Money FormField: currency_dec_point
and currency_thousands_sep
.
WDYT?
If we're talking about how to extend customization abilities of Persistence/UI then yes, it could work like that. BUT to be honest I would like to see all these localization/internationalization properties implemented somehow differently. Maybe by using something from our localization branch (not sure in what stage it is now)?
100% right. I always think of Persistence/UI of something that can be removed someday :)
Maybe not removed, but I don't feel that any Persistence should be somehow related to localization/internationalization. Persistence is about storing data (even if in session or cache) and you store pure data not localized. There should be something else in the middle which does this l16/i18 job.
closing in favor of https://github.com/atk4/ui/issues/1760