I have a properties file with messages and I want to handle some special cases of plural. Now I use:
xxx.yyy.plural=test{0,choice,2#y}
but it formats 12 as 'testy' also. How can I specify 2 as exact match?
I found an answer. It seems that choice statement in properties file works properly only if more than one choice is specified. So you have to specify at least one "else branch" If i rewrite my example:
xxx.yyy.plural={0,choice,2#testy|2<test}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With