Problem with messages with parameters

Hello,

I get work :


$this->addError($attribute, Yii::t('app', 'verify.applymax', $invoiceheaderamount));

This gives me :

But this does not work :


$this->addError($attribute, Yii::t('app', 'verify.applymax', $invoiceheaderamount, $paymentamount));

This gives me :

The message is defined in app.php as follows :


'verify.applymax' => 'blablabla {0} and blablabla {1}',

Any help would be nice !

Needs array




$this->addError($attribute, Yii::t('app', 'verify.applymax', [$invoiceheaderamount, $paymentamount]));



Works ! Thanks !