What is select ICU expression?

ICU expression is is similar to the plural expressions except that you choose among alternative translations based on a string value instead of a number. Here you define those string values.

Let's take component binding with residenceStatus property which has "citizen", "permanent resident" and "foreigner" possible values and the message maps those values to the appropriate translations.

<span i18n>The person is {residenceStatus, select, citizen {citizen} permanent resident {permanentResident} foreigner {foreigner}}</span>

July 31, 2022
516