[AnneVanKesteren] Add support for "hreflang".




The language of the resource you refer to is not always the same as the language of the feed and not always the same as the text used for the link (in the "title" attribute for example).


In section 3.4 "Link Construct", add the following section:

3.4.5 hreflang attribute

The "hreflang" attribute describes the language of the resource pointed to by the href attribute. When used together with the rel="alternate", it implies a translated version of the entry. Link constructs MAY have an hreflang attribute, whose value MUST be a registered language code as defined in [WWW]RFC3066 or its successor. If not present it is considered that no language information is available.


<feed version="0.3" xmlns="">
 <link rel="alternate" type="text/html" href=""/>
  <link rel="alternate" type="text/html" href=""/>
  <link rel="related" type="text/html" href="" hreflang="nl" xml:lang="en" title="Just an example"/>
  <link rel="related" type="text/html" href="" hreflang="de" xml:lang="en" title="Another example"/>



[AnneVanKesteren] If more elements have a "href" attribute", "hreflang" should be added to those as well. Some parts might need clarification by other people or me, this was just a quick set up.

[MarkPilgrim] Converted to camera-ready copy. We should consider a clarification somewhere that xml:lang refers to the text of the element itself (such as the title attribute), whereas hreflang refers to the text of the linked resource.

[MarkPilgrim] This usage is consistent with [WWW]link types in HTML, but there has historically been confusion because the HTML spec has a typo. Section 6.12 of the HTML spec states that "When (rel="alternate" is) used together with the lang attribute, it implies a translated version of the document", but this is incorrect. According to [WWW]the HTML errata, the correct statement is "When [rel="alternate"] is used together with the hreflang attribute, it implies a translated version of the document." I suggest we include this text explicitly in the Atom spec.