Hi,
I have this plural rule, seems to work fine:
echo Yii::t('tickets', 'n==1#one ticket|n==2#two tickets|n==3#three tickets|n>3#{n} tickets', $number);
The question is, how can I translate this expression?
Thanks!
Hi,
I have this plural rule, seems to work fine:
echo Yii::t('tickets', 'n==1#one ticket|n==2#two tickets|n==3#three tickets|n>3#{n} tickets', $number);
The question is, how can I translate this expression?
Thanks!
You can do something like this:
messages/ru/tickets.php:
return array(
'n==1#one ticket|n==2#two tickets|n==3#three tickets|n>3#{n} tickets'=>'n==1#Один тикет|n==2#Два тикета|n==3#Три тикета|n>3#{n} тикетов'
)
But i recomend to use core plural’s forms support.
I was totally sure I had tried in this way, but obviously I was wrong…
Thanks, worked!