Property Template Selection File

I have a message properties file and I want to handle some special plural cases. Now I use:

xxx.yyy.plural=test{0,choice,2#y}

but it also formats 12 as "testy". How to specify 2 as an exact match?

+5
source share
1 answer

I have found the answer. It seems that the select statement in the properties file works correctly only if more than one choice is specified. Therefore, you need to specify at least one else branch if I rewrote my example:

xxx.yyy.plural={0,choice,2#testy|2<test}
+5
source

All Articles