I use FBT package (4.0.5) for PHP. I need a parameter inside a plural. I would like to display the show name only if it is singular, otherwise I would like to display it as a plural. Like this:
Stranger Things was published
Stranger Things and 3 other series were published
I tried this:
<?php
echo fbt(
\fbt\fbt::plural(
\fbt\fbt::param('show name', 'Stranger Things') . ' was published',
3,
[
'name' => 'number of series',
'showCount' => 'ifMany',
'many' => 'series were published',
]
),
'Label for number of published series'
);
But this error is thrown:
fbt:plural expects text or an expression, and only one
---
<fbt:plural count="3" name="number of series" showCount="ifMany" many="series were published" implicitDesc="[show name] was published"><fbt:param name="show name">Stranger Things</fbt:param> was published</fbt:plural>
---