custompluralpattern(
custompluralpattern(
VALUE
,
PATTERN
,
PLURALS
)

The custompluralpattern( function converts a number to text using a pattern, making customizable adjustments for pluralization.

Parameters

This function has three parameters:

value – the number to convert.

pattern – pattern to be used to convert the number. The pattern format is the same as the pattern( function, but can also contain the words are, has and people. If the pattern contains these words, they will be adjusted if the number is one to is, have and person in the final output.

plurals – custom list of plurals and singulars. These are formatted in the form plural/singular,plural/singular etc.

Description

This function converts a number to text using a pattern, making customizable adjustments for pluralization.

    custompluralpattern(1,"# train~ are ready to go.","are/is") ☞ 1 train is ready to go.
    custompluralpattern(2,"# train~ are ready to go.","are/is") ☞ 2 trains are ready to go.
    custompluralpattern(1,"# people are attending.","are/is") ☞ 1 person is attending.
    custompluralpattern(2,"# people are attending.","are/is") ☞ 2 people are attending.

Note: Be sure to use the plural form in the pattern.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0