Geo0503LinkElement

From W3C Wiki
Jump to: navigation, search


Experimental Wiki page for handling FAQ comments

HOW TO EDIT THIS PAGE:

The whole text of the FAQ is here, paragraph by paragraph, with relevant comments sandwiched between. Each point made begins with the initials of the author and date (see below), and continues until the next author's initials or the next quote from the FAQ. Multiple points by the same author on the same piece of text are preceded by multiple initials and separated by "===". Related comments, and replies are grouped together were possible.

The text of the actual article is in bold.

If adding comments, please use a new paragraph and start the first paragraph in your comment with your initials, followed by the date in square brackets, following the form [RI 2feb].


Status: Initial Draft ie. no wordsmithing comments at this stage, please, other than for the question. Comments about structure, etc. very welcome though.

Using the link element

[DC 30 mar] Not specific enough for me. The important info for me is pointing to different localized versions of the document 'via' the link element.

Question

How do I use the link element to point to different localized versions of the document?

[DC 30 mar] Suggestion: "How can I point to different localized versions of the document using the link element?" I think the focus should be the task, rather than the link element.

Background

The HTML specification suggests that the link element can be used by search engines to find alternate translations of the current page. Likewise, some web browsers expose the link information on the user interface, allowing the user to navigate to versions of the current document written in alternative language. The link element provides a quick and convenient method for moving between translations.

[DC 30 mar] 'expose' is not useful terminology for me.

[DC 30 mar] I want to know what I can do, in terms of search engines & user interaction in the page. How I do it. Then confirmation that this is supported by W3C standards - but I would expect this being on the W3C site.

Currently, Mozilla and Mozilla Firefox provide mechanisms to access alternative versions of documents via the link element. Internet Explorer and Opera do not provide a method of accessing this information within the browser's user interface.

[DC 30 mar] Which browsers do or do not support this functionality should be in the answer.

[RI 30 mar] I think I agree.

[RR 18 mar] It would be good to point out what IE and opera do or do not when processign the tags.

  • **

[DC 30 mar] Would this information be more readable if it were bulleted?

Answer

The basic structure for a HTML document is <link rel="alternate" lang="fr" xml:lang="fr" title="Déclaration universelle des droits de l'homme" type="text/html" hreflang="fr" href="http://www.unhchr.ch/udhr/lang/frn.htm">

The basic structure for a XHTML document is <link rel="alternate" lang="ja" xml:lang="ja" title="世界人権宣言" type="text/html" hreflang="ja" href="http://www.unhchr.ch/udhr/lang/jpn.htm" />

This is exactly the same as for HTML - an error i think. I think you should instead state what the difference is: ie. "In XHTML you should also use the xml:lang attribute", and then give the example you have.

The rel="alternate" indicates the link points to an alternative version of the document. The title element contains the name of the alternative version of the web page. The lang and xml:lang attributes indicate the language of the title attribute value.

[DC 30 mar] It's not clear to me that this syntax should be contained in the target page. I think it should be in the HTML head of the target page, is that correct?

[RR 18 mar] Should "... indicates the link ...." read "... indicates that the link ...."

The hreflang attribute indicates the language of the target document.

[DC 30 mar] I would like an overview first with a description of how it is for the user, so I can decide whether I want to do this before the syntax of how to do it.

[RI 30mar] I agree with Deborah. Maybe we should have three subsections in the answer: one to show how the link element is used (perhaps using screen grabs from the test results page); the other describing how you make that happen; the third briefly describing which UAs support it (but referring to the test results for the full story).

DRC 11May Would it be better if the example used "content negotiation" type naming for the pages. e.g. ".../declaration.fr.html" and ".../declaration.ja.html" ?

By the way

Both Mozilla and Mozilla Firefox expose the link information in View > Page Info > Links dialog box. Additionally, Mozilla has a navigation toolbar which will also allow the user to navigate a site using link elements in a web page. <a href="http://extensionroom.mozdev.org/more-info/linktoolbar">Link toolbar</a> is a Mozilla Firefox extension that provides similar functionality to Mozilla's navigation toolbar.

Further reading

Test: Using link for alternative language versions of document

Description of link in HTML specification

Other W3C I18N resources relating to Language