Feature request: automatic thousands separator (with safe exclusions)
-
Hello,
I’m using wp-Typography on a French website and first of all, thank you for the quality of the plugin — it significantly improves typographic consistency.
I have a question regarding number formatting.
From what I understand, wp-Typography does not currently handle automatic insertion of thousands separators. Could you please confirm whether this feature exists or is planned?
In French typography, large numbers should be written with narrow non-breaking spaces (U+202F), for example:
- 10000 → 10 000
- 1250000 → 1 250 000
I would like to suggest adding this as an optional feature.
However, this would require some safeguards to avoid incorrect transformations. Typical cases to exclude would include:
- Years (e.g., 2024 should not become 2 024)
- Identifiers or technical codes
- Domain-specific notations such as railway rolling stock (e.g., “CC 6500”, “BB 7200”), where spacing must remain unchanged
A possible approach could be:
- Apply formatting only to standalone numbers above a configurable threshold (e.g., ≥ 5 digits)
- Ignore numbers adjacent to letters (before or after)
- Provide filters or hooks to allow developers to fine-tune exclusions
This feature would be especially valuable for editorial and publishing use cases in French and other locales with similar typographic rules.
Thanks in advance for your feedback, and congratulations again for your work on this plugin.
Best regards
You must be logged in to reply to this topic.