Last Updated: February 25, 2016
·
475
· kid-icarus

Conditional singular/plural output.

Check out format_plural()

TL;DR

$money = 0;
$output = format_plural($money, 'One money', '@count monies');

$output = '0 monies'

$money = 1;
$output = format_plural($money, 'One money', '@count monies');

$output = 'One money'

$money = 2;
$output = format_plural($money, 'One money', '@count monies');

$output = '2 monies'