Skip to content

Commit 0588173

Browse files
eemelistasm
authored andcommitted
Add ordinal plural example to guide (#259)
1 parent 2bc4b44 commit 0588173

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

guide/selectors.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,17 @@ your-score =
3939
}
4040
```
4141

42+
Using formatting options also allows for selectors using ordinal rather than
43+
cardinal plurals:
44+
45+
```
46+
your-rank = { NUMBER($pos, type: "ordinal") ->
47+
[1] You finished first!
48+
[one] You finished {$pos}st
49+
[two] You finished {$pos}nd
50+
[few] You finished {$pos}rd
51+
*[other] You finished {$pos}th
52+
}
53+
```
54+
4255
[CLDR plural category]: http://www.unicode.org/cldr/charts/30/supplemental/language_plural_rules.html

0 commit comments

Comments
 (0)