TextHelperGetAmountText Method |
If amount is equal to 1, expression using singular formatting string is returned, otherwise expression using plural formatting string is returned.
Namespace: CMS.HelpersAssembly: CMS.Helpers (in CMS.Helpers.dll) Version: 13.0.131
Syntax public static string GetAmountText(
int amount,
string singular,
string plural
)
Parameters
- amount
- Type: SystemInt32
Amount to be used - singular
- Type: SystemString
Singular formatting string. If formatting item {0} is not included, it is formatted as '[amount] [singular]', e.g.: 1 unit - plural
- Type: SystemString
Plural formatting string. If formatting item {0} is not included, it is formatted as '[amount] [plural]', e.g.: 3 units
Return Value
Type:
StringSee Also