Consider the following strings:
I have an apple.
I have 4 apples.
How do I get ZF2 to produce the second outcome? I am using translatePlural
and have tried a number of variations on this:
$translator->translatePlural('I have an apple', 'I have %d apples', 4);
$translator->translatePlural('I have an apple', 'I have %s apples', 4);
$translator->translatePlural('I have an apple', 'I have %$1 apples', 4);
$translator->translatePlural('I have an apple', 'I have %%s apples', 4);
There doesn't seem to be anything in the Zend documentation (1, 2) to explain how to do this. As such I'm not sure if it's even possible.