I want to be able to type something like:
Console.WriteLine(\"You have {0:life/lives} left.\", player.Lives);
instead of
Consol
I wrote an open-source library called SmartFormat that does exactly that! It's written in C# and is on GitHub: http://github.com/scottrippey/SmartFormat
Although it supports several languages, English "plural rules" are the default. Here's the syntax:
var output = Smart.Format("You have {0} {0:life:lives} left.", player.Lives);
It also supports "zero" quantity, and nested placeholders, so you could do:
var output = Smart.Format("You have {0:no lives:1 life:{0} lives} left.", player.Lives);