Microformats and foreign languages
In the past when I decided to mark up microformats (pretty new to them) in english websites it would be like this:
<span class="tel">
<span class="type">Home</span>:
<span class="value">1234567</span>
</span>
However, when it comes to foreign languages I'm not sure if I can just do this:
<span class="tel">
<span class="type">Home Phone in Chinese</span>:
<span class="value">12开发者_如何学JAVA34567</span>
</span>
or must I do this (or something else):
<span class="tel">
<span class="type" style="text-indent:-9999em;">Home</span>Home Phone text in Chinese:
<span class="value">1234567</span>
</span>
Thanks in advance!
Looks like the microformats.org site is down right now, but when it comes back up, you'll see a solution to this here:
http://microformats.org/wiki/value-class-pattern
It looks like this:
<span class="tel">
<span class="type"><span class="value-title" title="home"> </span>Home Phone in Chinese</span>:
<span class="value">1234567</span>
</span>
Basically, you hide the machine-readable type in a title field when it doesn't match your human-readable type (either because of language or just different terminology). Note that the space in the value-title span is important to prevent some tools from ignoring the element when it's empty.
精彩评论