拓展 / I18nOptions / PluralForms
接口: PluralForms
取决于计数的消息,语言使用的每个 CLDR 复数类别有一个条目。该形式由 Intl.PluralRules 从 count 参数中选取; other 是必需的,因为每种语言都有它。
示例
ts
{ one: 'Hid {count} node', other: 'Hid {count} nodes' }
// Polish needs three forms
{ one: 'Ukryto {count} węzeł', few: 'Ukryto {count} węzły', many: 'Ukryto {count} węzłów', other: 'Ukryto {count} węzła' }属性
few?
optionalfew:string
many?
optionalmany:string
one?
optionalone:string
other
other:
string
two?
optionaltwo:string
zero?
optionalzero:string