title: Best practices in internationalizing text with lots of markup?
body: <p>I'm working on a web project that will (hopefully) be available in several languages one day (I say "hopefully" because while we only have an English language site planned today, other products of my company are multilingual and I am hoping we are successful enough to need that too).</p>
  
  <p>I understand that the best practice (I'm using Java, Spring MVC, and Velocity here) is to put all text that the user will see in external files, and refer to them in the UI files by name, such as:</p>
  
  <pre><code>#in messages_en.properties:
  welcome.header = Welcome to AppName!
  
  #in the markup
  &lt;title&gt;#springMessage("welcome.header")&lt;/title&gt;
  </code></pre>
  
  <p>But, having never had to go through this process on a project myself before, I'm curious what the best way to deal with this is when you have some segments of the UI that are heavy on markup, such as:</p>
  
  <pre><code>&lt;p&gt;We are excited to announce that Company1 has been acquired by
  &lt;a href="http://www.companydivisionx.com" class="boldLink"&gt;Division X&lt;/a&gt;,
  a fast-growing division of &lt;a href="http://www.company2.com" class="boldLink"&gt;Company 2&lt;/a&gt;, Inc. 
  (Nasdaq: &lt;a href="http://finance.google.com/finance?q=blah" class="boldLink"&gt;BLAH&lt;/a&gt;), based in...
  </code></pre>
  
  <p>One option I can think of would be to store this "low-level" of markup in messages.properties itself for the message - but this seems like the worst possible option. </p>
  
  <p>Other options that I can think of are:</p>
  
  <ul>
  <li>Store each non-markup inner fragment in messages.properties, such as <code>acquisitionAnnounce1</code>, <code>acquisitionAnnounce2</code>, <code>acquisitionAnnounce3</code>. This seems <em>very</em> tedious though.</li>
  <li>Break this message into more reusable components, such as <code>Company1.name</code>, <code>Company2.name</code>, <code>Company2.ticker</code>, etc., as each of these is likely reused in many other messages. This would probably account for 80% of the words in this particular message.</li>
  </ul>
  
  <p>Are there any best practices for dealing with internationalizing text that is heavy with markup such as this? Do you just have to bite down and bear the pain of breaking up every piece of text? What is the best solution from any projects you've personally dealt with?</p>