TextHelper GetAmountText Method Kentico 8.0 API Reference
If amount is equal to 1, expression using singular formatting string is returned, otherwise expression using plural formatting string is returned.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 8.0.0.0 (8.0.5239.26125)

Parameters

amount
Type: OnlineSystem Int32
Amount to be used
singular
Type: OnlineSystem String
Singular formatting string. If formatting item {0} is not included, it is formatted as '[amount] [singular]', e.g.: 1 unit
plural
Type: OnlineSystem String
Plural formatting string. If formatting item {0} is not included, it is formatted as '[amount] [plural]', e.g.: 3 units

Return Value

Type: OnlineString
See Also