I'm trying to fix a formatting error in the PHP NumberFormatter class for my language, Bulgarian: thousands grouping is only introduced for 5+ digit numbers, i.e. "5 000" is wrong.
Is there a predefined constant I can use?
I thought this would be NumberFormatter::GROUPING_SIZE but this doesn't take into consideration the above rule. Should I be looking for some other attribute or is what I'm trying to do not possible?
While it's not likely to be able to do this directly, you can use a wrapper class that modifies the output to what you expect:
To use:
As a note, the INTL extension is not run directly by PHP. It is a wrapper for the ICU library that is available on just about every system and used for formatting & translation - even by web browsers. If you think this should be changed in the ICU library, you can request changes here: https://icu.unicode.org/bugs