title: How to include links to translations in HMENU sitemap?
body: <p>I would like to create a sitemap via TypoScript which does also include links to all available translations.
  Unfortunately the <em>special=language</em> feature does only work for the current page, not for multiple pages.
  A combination of a regular HMENU with <em>special=language</em> menus in its items would be perfect.</p>
  
  <p>My approach:</p>
  
  <pre><code>lib.menu = HMENU
  lib.menu {
      entryLevel = 0
      1 = TMENU
      1{
          expAll = 1
          NO{
              doNotShowLink = 1
              allWrap{
                  postCObject = COA
                  postCObject{
                      stdWrap.wrap = &lt;url&gt;|&lt;/url&gt;
                      1 = TEXT
                      1{
                          typolink.parameter.field=uid
                          typolink.returnLast = url
                          wrap = &lt;loc&gt;|&lt;/loc&gt;
                      }
  
                      2 &lt; .1
                      2.typolink.additionalParams = &amp;L=1
                      2.wrap = &lt;xhtml:link rel="alternate" hreflang="en" href="|" /&gt;
                  }
              }
          }
      }
      2 &lt; .1
      3 &lt; .1
  }
  </code></pre>
  
  <p>That almost works, but unfortunately links will also be generated for non-available translations.</p>