Back

Pluralization via Translation Files


David Harkness posted 2 weeks ago

I cannot get the simple method of pluralization working.

'apples' => 'There is one apple|There are many apples',

trans_choice('ui.apples', 2) -> 'There is one apple'

However, specifying the values does work.

'apples' => '{1} There is one apple|[2,*] There are many apples',

trans_choice('ui.apples', 2) -> 'There are many apples'

I'm using Laravel 5.6. Before I file a bug, am I missing something obvious?


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us