Google has come up with smarter solution for Multilingual and multinational site annotations in Sitemaps than coding it into every page of the site. Google now offers support for specifying the rel-alternate-hreflang annotations in Sitemaps which helps smaller page size and easier deployment for some websites.
For example, we want to specify that for the URL http://www.example.com/en, targeting English language users, the equivalent URL targeting Spanish language http://www.example.com/de. Up till now, the only way to add such annotation is to use a link element, either as an HTTP header or as HTML elements on both URLs like this:
<link rel="alternate" hreflang="en" href="http://www.example.com/en" >
<link rel="alternate" hreflang="de" href="http://www.example.com/de" >
But now google offers to use the following equivalent markup in Sitemaps which reduces the work to add in each page code.
<url>
<loc>http://www.example.com/en</loc> <xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/de" /> <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en" /> </url> <url> <loc>http://www.example.com/de</loc> <xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/de" /> <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en" /> </url>