title: Velocity template localization
body: <p>I'm working on a task that's using Velocity to generate an email from a template.  One of my requirements is that the email message be localized, based on a <code>Locale</code> submitted by the user.  I've got this working for the most part, using Velocity's <code>ResourceTool</code> to pull in a <code>MessageBundle</code>.  The other requirement is that I can only have one template - I don't want one template per language or locale because this is difficult to maintain if changes are needed.</p>
  
  <p>As a part of a <code>MessageBundle</code>, I can have what's referred to as "compound messages", which are messages that have variables that are replaced when the message is evaluated.  For example:</p>
  
  <pre><code>dear.name=Dear {0}:
  </code></pre>
  
  <p>My question is this: how do I get Velocity to replace the <code>{0}</code> value with a name that I pass in?</p>
  
  <p>It's not acceptable to simply modify my Velocity template so that I simply replace the name at the template level - in some languages, the greeting word "Dear" comes after the name, so this would yield an incorrect output.</p>