title: Is there a .NET equivalent to MediaWiki's 'PLURAL' construct for dealing with parameters in localized text?
body: <p>I'm in the process of getting resource files (resx) put together for the localization of an ASP .NET web application. These resource files will later be provided to translators so that the contents can be translated into all of the languages that we'll need to support.</p>
  
  <p>It's my understanding that dealing with issues like pluralization can be difficult when you start dealing with different languages. Consider the example of wanting to display a confirmation message to a users asking if they want to delete one or more of the records on the current screen. As part of that message we want to include the number of records that want to be deleted, so we might define the resource text as:</p>
  
  <p>Are you sure you want to delete these {0} record(s)?</p>
  
  <p>This sidesteps the issue of using the word "record" vs. records. It's a bit of a grammatical hack, but I suppose it works well enough in English. That said, I don't want to assume that this same approach will work for other languages. In some cases (like Chinese), the pluralization isn't even an issue, but in other languages it certainly will be and using the (s) hack probably isn't going to cut it.</p>
  
  <p>I've been reading the <a href="http://www.mediawiki.org/wiki/Localisation#Switches_in_messages.E2.80.A6" rel="nofollow">Localization Article</a> on the MediaWiki wiki (dogfooding!) and found that they actually have the ability to embed different text to use in the message depending upon whether the value of the parameter is plural or not. So the resource text above would become (note the use of $1 for the parameter placeholder instead of {0}, but the concept is the same):</p>
  
  <p>Are you sure you want to delete these $1 {{PLURAL:$1|record|records}}?</p>
  
  <p>I like this syntax and was wondering if there were any .NET libraries out there that could interpret this that I might be able to plug in to a custom resource manager for my web application to support functionality like this.</p>