|
From: Markus S. <mar...@gm...> - 2022-11-01 22:38:37
|
On Tue, Nov 1, 2022 at 2:55 PM jdi...@ya... <jdi...@ya...>
wrote:
> > "{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}}"
>
> It means I should write these rules by myself (example above is for
> English, and similar rulesets for other languages I need). But I would
> rather get it automatically from ICU (like {0, ordinal} but it does not
> seem to work for some languages, "ru" for instance)
>
The problem is that the spelling changes with gender and noun case and
other categories, depending on context and language. I guess that the
default "ordinal" output is generic in languages where this is complicated.
We have RBNF rules for lots of these variants for some languages, but there
is no good way to select the right one for a given sentence. By having
these suffixes in the translatable/translated message, with the necessary
mapping from number to selectordinal variant, the message author and the
translators can tailor the suffixes to the grammatical context.
markus
>
|