Skip to content

does icu4x support selectordinal? #2806

Answered by zbraniecki
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @byte1234 ! Thank you for interest in ICU4X.

Yes, we support it via icu::plurals::PluralRules.

In the snippet example it uses PluralRuleType::Cardinal which you can swap for Ordinal to get that instead.

Compared to ICU4C/J and ECMA-402 we renamed the method select to category_for to leave space for deeper future integration into upcoming MessageFormat 2 plural selection model.

I apologize for the inconvenience and hope this helps. Please let me know if it resolved your issue

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ghost
Comment options

@zbraniecki
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant