Marian Boricean
Marian Boricean

Reputation: 100

Plural translation on Yii2 does not work on the production server

I am working on a PHP Yii2 application using the advanced template.

On my local development machine, the plural form in the translation function works as expected:

enter image description here

When I upload the application to the production server, the application doesn't seem to recognize the plural setup:

Yii::t('app', '{n, plural, =0{nothing found :(} =1{one result found} other{found # results}}', ['n'=>sizeof($results)]);

enter image description here

Not sure what could be the issue here. The PHP intl extension is installed on the production server and the other Yii::t() instances (except plural) work fine.

enter image description here

Any help would be greatly appreciated!

Upvotes: 0

Views: 788

Answers (1)

meysam
meysam

Reputation: 1794

It seems that your ICU library is out to date, based on Yii documentation:

It is also recommended that you use an ICU version equal or greater than version 49.

Upvotes: 1

Related Questions