I'm trying to translate results count to Lithuanian and there are some specific rules. I'll try to explain them:
I tried something like this (using YAML), but even number 40
doesn't match the rules:
'%count% Results, ': '{0,*0}%count% rezultatų |{1,*1}%count% rezultatas |]1,10[%count% rezultatai |]10,20[%count% rezultatų '
Is it even possible to do something like that using YAML? With the above example I get:
An exception has been thrown during the rendering of a template ("Unable to choose a translation for "{0,*0}%count% rezultatų |{1,*1}%count% rezultatas |]1,10[%count% rezultatai |]10,20[%count% rezultatų " with locale "lt". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %count% apples").")
So I was trying to solve my problem following Wouters answer and found out that there is Symfony\Component\Translation\PluralizationRules
and Lithuanian is already there. All I had to do is remove intervals from my translation line and it works as expected now.
'%count% Results, ': '%count% rezultatas |%count% rezultatai |%count% rezultatų '