Page MenuHomePhabricator

Add support for ordinal numbers
Open, MediumPublicFeature


Right now, MediaWiki has no way to localize '1st', '2nd', '3rd', etc. The CLDR database includes rules for creating ordinal numbers but these rules are not currently extracted or utilized by the cldr extension.

The rules are ruleset type="digits-ordinal-indicator" in core/common/rbnf. Here is a sample for English:

<ruleset type="digits-ordinal-indicator" access="private">

<rbnfrule value="0">th;</rbnfrule>
<rbnfrule value="1">st;</rbnfrule>
<rbnfrule value="2">nd;</rbnfrule>
<rbnfrule value="3">rd;</rbnfrule>
<rbnfrule value="4">th;</rbnfrule>
<rbnfrule value="20">→→;</rbnfrule>
<rbnfrule value="100">→→;</rbnfrule>


Version: unspecified
Severity: enhancement

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:41 AM
bzimport set Reference to bz57903.
bzimport added a subscriber: Unknown Object (MLST).

This is being requested for the KeepGoing feature in MobileFrontend ( We're probably just going to change the requirements for now.

Change 678307 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/core@master] Add ordinal transformation as GRAMMAR for English

Test wiki created on Patch Demo by Jon Harald Søby using patch(es) linked to this task:

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:23 PM
Aklapper removed a subscriber: wikibugs-l-list.

Test wiki on Patch demo by Jon Harald Søby using patch(es) linked to this task was deleted: