[rdfweb-dev] languages

Graham Klyne GK at ninebynine.org
Wed Jul 30 09:54:26 UTC 2003

At 16:40 29/07/03 -0500, Peter Saint-Andre wrote:
>One bit I'd like to see in FOAF is a way to specify what languages I
>know, including level (fluent, beginner, intermediate, etc.) and which
>language I prefer, if any. Identifiers would use the codes in RFC 3066.
>What is the best way to add this in? In my FOAF-newbie-ness, I would
>propose something like the following:
><foaf:language type='preferred' level='fluent'>en</foaf:language>
><foaf:language type='reading' level='intermediate'>la</foaf:language>
><foaf:language type='reading' level='intermediate'>el</foaf:language>
><foaf:language type='occasional' level='beginner'>cz</foaf:language>
><foaf:language type='occasional' level='beginner'>nl</foaf:language>
><foaf:language type='occasional' level='beginner'>de</foaf:language>

Watching some responses to this, I find myself wondering if a useful 
approach would be to start by considering the simplest case, and working 
out from there.

I may be wrong, but I'd imagine that for a large number of jabberers, the 
main thing they want to convey is "here is a language I speak", so a simple 
take would be something like:


but this is rather limiting, since it leave no room to add 
qualifications.  Following the mantra of "simple things should be easy, 
complex things possible", replacing the language tag literal with a 
resource seems a small step which allows a lot of flexibility:


because now other properties can be added.  Is this "easy"?  The above 
looks like a lot of additional text in the description, but it can be 
abbreviated in RDF as:

    <foaf:language rdf:value="en" />

which seems fairly acceptable, except that the choice of "rdf:value" lacks 
a clear (formal) semantic base, so maybe a more explicit name might be helpful:

    <foaf:language foaf:langTag="en" />

Other features can be added, as required, and (as always) other RDF 
vocabularies can be mixed in "to taste"; e.g.

    <foaf:language foaf:langTag="fr" foaf:langUsage="occasional" />

This is looking quite close to your original proposal, but note that RDF 
allows the alternative syntax to be used for the same information, so the 
above example might be:



    <foaf:language rdf:parseType="Resource">

But one form that you can't use with is the combination of literal element 
content and attributes of your original example.  If you think of it in 
terms of the RDF graph model, the reason becomes fairly obvious; e.g. see:

One alternative approach I toyed with, but I'm not sure if there's any real 
advantage, was to treat the language as an RDF *class* rather than a 
language *property*.  One might have a generic "attribute" property, with 
the fact of being a language attribute being encoded by the type of the 
property; e.g.


I'm not seriously suggesting this last idea, just mentioning it as an 
illustration of alternative approaches that are possible.


Graham Klyne
<GK at NineByNine.org>
PGP: 0FAA 69FF C083 000B A2E9  A131 01B9 1C7A DBCA CB5E

More information about the foaf-dev mailing list