babel icon indicating copy to clipboard operation
babel copied to clipboard

Format ordinal numbers

Open septatrix opened this issue 3 years ago • 1 comments

Often one wants to generate a list of things with ordinals in front of them. E.g. "1st place: Foo, 2nd place: Bar" or "1st choice: Hello, 2nd choice: World". The way these ordinals are represented differs between languages. In e.g. german this would commonly be written as "1. place: Foo, 2. place: Bar".

PyBabel should support these use cases with a respective formatter. Rules how this works can probably be taken from the ICU library.

septatrix avatar Aug 21 '22 08:08 septatrix

Ordinal numbers are usable in some locales even for dates, e.g. "18th September, 2022", which would be very nice (using Pattern Syntax).

czepiec avatar Sep 26 '22 19:09 czepiec