title: Using custom entities in HTML documents
body: <h2>tl;dr</h2>
  
  <p>I'd like to understand if it is possible (and, in case, how well supported) to use custom entities in HTML documents for localization purposes.</p>
  
  <hr>
  
  <p>What I envision is doing something like this:</p>
  
  <pre><code>&lt;!DOCTYPE html "/locales/en-us.ent"&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;&amp;contactus.title;&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;p&gt;&amp;contactus.youcanreach;&lt;br&gt;123, Example Road&lt;br&gt;12345 Example City&lt;/p&gt;
      &lt;ul id="menu"&gt;
        &lt;li&gt;&amp;menu.home;&lt;/li&gt;
        &lt;li&gt;&amp;menu.products;&lt;/li&gt;
        &lt;li&gt;&amp;menu.contactus;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and all entities would be stored in a file (one for each language, en-us.ent in the example above) that gets included at the top of the document, e.g.</p>
  
  <pre><code>&lt;!ENTITY menu.home "Home"&gt;
  &lt;!ENTITY menu.products "Products"&gt;
  &lt;!ENTITY menu.contactus "Contact us"&gt;
  ...
  </code></pre>
  
  <p>Eventually this could even be exapnded to HTML fragments (not sure if this is really allowed) that may be useful on all pages (such as headers, menus, etc.; in the example above, the whole <code>&lt;ul&gt;</code> could be such a fragment)</p>
  
  <p>Now, my understanding is that this is theoretically possible in XHTML, but I was wondering if this can be done also in HTML and, in case, how well browsers (and crawlers) would cope.</p>