Yii:t() and choice format


I’m using Yii’s function t() in order to translate some message.

My code looks like this:

<?php echo Yii::t('shop', '1#one book|n>1#many books', $count); ?>

The error I get here is:

Fatal error: Cannot unset string offsets in C:\www\framework\YiiBase.php on line 484

When I change "$count" to "5", error changes to:

strtr() [<a href='function.strtr'>function.strtr</a>]: The second argument is not an array

Am I missing something ?

the third parameter should be an array.

Damn, it worked. Thank you.