Language Maps [was RE: [uf-discuss] Microformats vs XML]
brian suda
brian.suda at gmail.com
Mon May 1 07:38:45 PDT 2006
xml:lang is already used within each microformat. For those who don't
know, you can mix-and-match language attributes within the same
document. So it is possible to have something like:
<div class="vcard" xml:lang="en">
<span class="fn">Brian Suda</span>
<org class="org" xml:lang="fr">Foo Bar</org>
</div>
The resulting vCard looks something like:
VCARD:BEGIN
FN;LANG=en:Brian Suda
N;LANG=en:;Suda;Brian;;;
ORG;LANG=fr:Foo Bar
VCARD:END
Citations will do this as well, have a book written in one language,
publisher be in another country, and the author a third.
By adding the xml:lang you can specific the language of the text, NOT
the language of the class names or profile.
-brian
Steven Livingstone wrote:
> Why not just specify or xml:lang attribute on the Microformat?
>
> e.g.
>
> <a rel="reference" href="http://www.microformats.org/wiki/hcard-profile" xml:lang="fr">
> Carte de langue pour hCarte à hCard</a>
>
> <class = "profile" xml:lang="fr">
> <dl>
> <dt id='nom-et-prenoms' ref='fn'>nom-et-prenoms</dt>
> <dd>Le nom et prenoms</dd>
> <dt id='donne-le-nom' ref='given-name'>donne-le-nom</dt>
> <dd>Donne le nom</dd>
> <dt id='nom-de-famille' ref='family-name'>nom-de-famille</dt>
> <dd>Nom de famille</dd>
> </dl>
> </class>
>
> That way an interpreter could just check the value of this and map the class name.
>
> This would allow me to easily have an English, Spanish and French hCard on the same page.
>
> ----
> Steven Livingstone
> http://stevenR2.com
>
> ---------- Original Message ----------------------------------
> From: "Joe Andrieu" <joe at andrieu.net>
> Reply-To: Microformats Discuss <microformats-discuss at microformats.org>
> Date: Mon, 1 May 2006 01:33:51 -0700
>
>
>>> From: Tantek Çelik Sunday, April 30, 2006 6:56 PM
>>> To: microformats-discuss
>>> Subject: Re: [uf-discuss] Microformats vs XML
>>>
>>> On 4/30/06 6:20 PM, "Karl Dubost" <karl at w3.org> wrote:
>>>
>>>> And your page has class names in English when you are using another
>>>> language. -1
>>>>
>> [snip]
>>
>>> Thus with microformats, you may use both the standard microformat class
>>> names, AND class names in your own non-English language if you wish:
>>>
>>> <span class="family-name soyad">Çelik</span>
>>>
>>> ("soyad" is Turkish for family-name)
>>>
>>> Whereas with POX markup standards, you are relegated to only using the
>>> element names from the spec.
>>>
>>> <family-name>Çelik</family-name>
>>>
>> The current microformat model is certainly better than POX, but I think it
>> still leaves something to be desired. This approach still requires that
>> everyone uses the Microformats Approved(r) Anglo-biased namespace, even if
>> they get to add their own term to the class.
>>
>> To the extent we can enable other peoples and languages to "own"
>> Microformats and participate as first class citizens, I suggest it would be
>> a Good Thing(tm). Couldn't we allow a mapping of any microformat into any
>> language? This seems to be a simple solution for both humans and computers.
>>
>> If we utilize the microformat attribute I mentioned in my previous email (or
>> simply standardize on a profile mechanism), we could see something like
>> this:
>>
>> <a class="hcarte"
>> microformat="http://www.microformats.org.fr/hcarte-profile">
>>
>> And in the hcarte-profile, we see something like this (again, apologies for
>> any technical errors):
>>
>> <a rel="reference" href="http://www.microformats.org/wiki/hcard-profile">
>> Carte de langue pour hCarte à hCard</a>
>>
>> <class = "profile">
>> <dl>
>> <dt id='nom-et-prenoms' ref='fn'>nom-et-prenoms</dt>
>> <dd>Le nom et prenoms</dd>
>> <dt id='donne-le-nom' ref='given-name'>donne-le-nom</dt>
>> <dd>Donne le nom</dd>
>> <dt id='nom-de-famille' ref='family-name'>nom-de-famille</dt>
>> <dd>Nom de famille</dd>
>> </dl>
>> </class>
>>
>> My apologies for my French, but hopefully it gets the idea across.
>> Initially I wasn't sure if the hCard reference terms should be
>> human-readable, rather than attributes of the dictionary entry. If we are
>> going with the culturally sensitive approach, then I think the profile
>> should be 100% human readable /in the presenting language/.
>>
>> Thus, if a French author/developer discovers the above mentioned
>> microformat, they may simply use it the same way the first user did:
>>
>> <a class=hcarte
>> microformat=http://www.frenchmicroformats.org/hcarte-profile>
>>
>> All without any requirement of seeing or using English except the one
>> reference to hCard in the title of the profile. (And technically that could
>> be cut out). Plus, the elements of the microformat are now semantically
>> relevant to the human author. So, the French soccer-dad who wants to put his
>> daughter's soccer schedule online doesn't have to keep mentally translating
>> between the English hcard class names and his native language. This makes
>> Microformats much easier to use, especially in cultures and countries where
>> English is not quite the standardized "second tongue."
>>
>> Once any microformat profile has been mapped to a language, it is easily
>> language-friendly to anyone using that language, assuming they can find the
>> mapping (another argument for a central registry).
>>
>> I expect some might see this approach as offering the potential for chaos.
>> However, the profile would still be a 1:1 mapping to a well-understood
>> microformat. And if we have a reliable profile mechanism, the automated
>> discovery of the semantic translation would be straightforward. Hence,
>> humans get to use the language they want and computers get clean semantic
>> data. Isn't that what is at the heart of the Microformats approach?
>>
>> Does this make any sense?
>>
>>
>> -j
>>
>>
>> --
>> Joe Andrieu
>> joe at andrieu.net
>> +1 (805) 705-8651
>>
>> _______________________________________________
>> microformats-discuss mailing list
>> microformats-discuss at microformats.org
>> http://microformats.org/mailman/listinfo/microformats-discuss
>>
>>
>
>
>
>
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss
>
>
More information about the microformats-discuss
mailing list