/ Microformats, English only?

Microformats, for those who aren’t in the know, are simply a way to further add semantics to HTML content by using agreed upon class names based on existing models already in use elsewhere. One of the most common microformats–and the subject of this post–is hCard, which is based upon the widely used vCard (RFC 2426) format.

I’ve had the (dis)pleasure of trying to implement hCard on two bilingual sites now only to come to the conclusion that hCard probably wasn’t as well thought out–or to be fair, mature–as I’d have hoped. The reason for it can be seen clearly in the following code example:

<div class="vcard">
  <span class="tel">Tél.:<span class="value">+1.514.555.1212</span></span>
  <span class="tel"><span class="type">Fax</span> Téléc.:<span class="value">+1.514.555.1212</span></span>

The telephone number’s type value is derived from the span tag’s contents which is displayed in the clear. It is therefore a part of the page’s contents and difficult, if not impossible to justify in a page whose contents are in French–or Spanish, or whatever. Of course, one could always hide the text with CSS, but that’s hardly a solution when separation of content and presentation is concerned.

I raised the issue on the Microformats discussion list and was given a solution that seemed to make sense to me. But shortly thereafter it was pointed out by someone else that the solution itself was a documented issue and not a good solution after all.

In the midst of all of this I came to realize that though Microformats are a great idea and highly useful when they work, the broader issue of internationalization needs to be worked into them if they’re truly to become useful outside of the “English only” world.


Read more from the archive.