Countries, flags and languages

So Tara was the first one to put those little flags everywhere, indicating the languages of a document targeted by a link. But she's still putting images into her documents, by hand, link by link. Ok, you are sure that it works in aall browsers but that's still hard to maintain, and to tell the truth, an ugly hack.

Then Karl, le tombeur de ces dames du W3C et d'ailleurs, discovered that CSS can do the same giving life back to an HTML attribute almost forgotten : hreflang. It indicates the language of the target of the link. Here's, in substance, what Karl wrote :

a[hreflang="fr-ca-qc"] {
background-image: url(flag_quebec.gif);
background-repeat: no-repeat;
background-position: top right;

Hum. That was not very nice. That's exactly the kind of ugly hack we are using in Composer's AllTags mode and I've always hated it. So I proposed Tara and Karl to move to this :

a[hreflang]:after {
  content: url(flag_quebec.gif);

which is conceptually much nicer. And then, Dominique Hazaël-Massieux made a good point : we should use language names or identifiers but certainly not flags. So here's my last proposal, and let the power of CSS be.

a[hreflang]:after {
  content: " [" attr(hreflang) "] ";
  color: #cc9933;
  font-weight: bold;