ui icon indicating copy to clipboard operation
ui copied to clipboard

Add possibility to change Number formatting of Number Field

Open PhilippGrashoff opened this issue 4 years ago • 3 comments

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?

PhilippGrashoff avatar Apr 23 '20 10:04 PhilippGrashoff

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)?

DarkSide666 avatar Apr 24 '20 11:04 DarkSide666

100% right. I always think of Persistence/UI of something that can be removed someday :)

PhilippGrashoff avatar Apr 24 '20 11:04 PhilippGrashoff

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.

DarkSide666 avatar Apr 27 '20 12:04 DarkSide666

closing in favor of https://github.com/atk4/ui/issues/1760

mvorisek avatar Oct 03 '22 22:10 mvorisek