|
From: Markus S. <mar...@gm...> - 2022-11-01 20:57:19
|
A pattern like "{0, ordinal}" uses class RuleBasedNumberFormat which has a
lot of variations of rules available, although I am not sure if you can
select the variants from inside a MessageFormat pattern.
A more modern usage pattern would be to use the "selectordinal" type and
put the number suffixes into the message itself (and into the translations,
of course).
For example: "{DAY_OF_MONTH,selectordinal, one{Monthly on the #st
day}two{Monthly on the #nd day}few{Monthly on the #rd day}other{Monthly on
the #th day}}"
markus
|