How to use plurals in android ?
Different languages have different rules for grammatical agreement with quantity. In English, for example, the quantity 1 is a special case. We write “1 book”, but for any other quantity we’d write “n books”. This distinction between singular and plural is very common, but other languages make finer distinctions. The full set supported by Android is zero, one, two, few, many, and other.
<plurals name="numberOfSongs"> <item quantity="one">one song found.</item> <item quantity="other">%d songs found.</item> </plurals> in Java class we can get values as shown below: int count = getNumberOfsongsAvailable(); Resources res = getResources(); String songsFound = res.getQuantityString(R.plurals.numberOfSongsAvailable, count, count);
For more reference follow this link here.