Techniques for multilingual Web sites:
Placement of links

How should the links to different language versions be placed on a page. It is obviously useful to use the same positioning on all pages of a site, but which? The following list presents some alternatives and their pros and cons:

Perhaps the optimal solution would be the following, if the language links take relatively small space (e.g. at most a dozen links, with language codes as link texts): Write the language links at the end of a document, but use style sheets to suggest, using absolute positioning, that they be physically positioned positioned at the beginning, into top right corner. In this small set of pages, the language links have been implemented that way. At the end of a page, there is a div element containing the links, and it has the attribute id="langlinks", and the style sheet contains this:

#langlinks { position: absolute; top:0.5em; right:0; 
   text-align: right;
   font-family: "Lucida Console", "Courier New", Courier, monospace;
   font-size:110% } 
h1 { margin-top : 1em; font-size: 125%; }

Thus a browser which does not support CSS positioning or ignores the style sheet rules for some reason, displays the links at the end of a page. A browser that supports the CSS features used displays the links in the top right corner in a relatively large monospace font.

In theory, we could use link elements to specify the language links, and this would leave it up to each browser to present them in a manner that is suitable for the browsing situation. Unfortunately this method still isn't supported by many popular browsers at all, so we can't build the linking upon them now or in the near future.

Next section: Language negotiation in the protocol.


2003-02-03 Jukka K. Korpela