Skip to content

Plural localization for negative number does not apply CLDR plural rules #503

@axunonb

Description

@axunonb

Discussed in #497

Related: PluralLocalizationFormatter

Originally posted by karljj1 October 2, 2025
Hi,

I have noticed that if we use a negative value in a plural, the behaviour is different.
For example, -1 will produce a different result than 1 when using the English plural:

I have {0:plural:{} apple|{} apples}

1 = I have 1 apple
-1 = I have -1 apples

Are there situations where a negative plural will be different, or should we Math.Abs them before we evaluate the plural?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions