[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 RFC3066 or its successor. If not present it is considered that no language information is available.
<feed version="0.3" xmlns="http://purl.org/atom/ns#"> <title>example</title> <link rel="alternate" type="text/html" href="http://diveintomark.org/"/> <modified>2003-12-13T18:30:02Z</modified> <author><name>Example</name></author> <entry> <title>Foo</title> <link rel="alternate" type="text/html" href="http://example.org/foo"/> <id>tag:diveintomark.org,2003:3.2397</id> <issued>2003-12-13T08:29:29-04:00</issued> <modified>2003-12-13T18:30:02Z</modified> <link rel="related" type="text/html" href="http://example.net/nl" hreflang="nl" xml:lang="en" title="Just an example"/> <link rel="related" type="text/html" href="http://example.net/de" hreflang="de" xml:lang="en" title="Another example"/> </entry> </feed>
[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 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 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.