• 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

Viewing 1 replies (of 1 total)
  • Plugin Author pepe

    (@pputzer)

    Hi! It’s not something that is currently supported, but I have toyed with the idea before (I wanted to do it entirely via CSS, though).

    A heuristic for years could be added, but the “domain-specific notations” would probably have to be worked around manually (i.e. by using <span class="noTypo"> or via filter hooks). I’m not sure how much time I’ll have in the near future, but there is a ticket to track it in the underlying library.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.