Click or drag to resize
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.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 12.0.0
Syntax
C#
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: String
See Also