Re: Language in schema.org

Hi all:
I would strongly prefer to use the same mechanism for indicating the language of visible and invisible content, so html5 lang would be a natural candidate for this, IMO. It would also mean that the language set at a higher level would be effective for both RDFa and Microdata meta-data, which seems a good thing to me.

Martin

On Oct 25, 2011, at 11:16 PM, Jeni Tennison wrote:

> Jason,
> 
> Yes, I agree, but from what I think Hixie is saying, it's not conformant with microdata to use the HTML lang attribute to provide language information: it has to be explicitly indicated using a property in the vocabulary to carry the language.
> 
> Jeni
> 
> On 25 Oct 2011, at 22:05, Jason Douglas wrote:
> 
>> I've been personally suggesting allowing multiple itemprops, even for unique properties, as long as they have different html5 lang= attribute values. Even supporting that capability on only Thing/name would cover a lot of use cases without much added complexity. 
>> 
>> -jason
>> 
>> On Tuesday, October 25, 2011, Jeni Tennison <jeni@jenitennison.com> wrote:
>>> Hi,
>>> 
>>> How should multi-lingual content be handled in schema.org expressed in microdata?
>>> 
>>> Language is not part of the microdata data model, and microdata vocabularies must provide vocabulary-specific mechanisms for supporting values that have an associated language [1].
>>> 
>>> The schema.org vocabulary supports publishers indicating the language of the content of a CreativeWork through the inLanguage property [2]. From what I can tell, that's the only language-related schema.org property.
>>> 
>>> How does schema.org deal with multi-lingual values for other properties? For example, I have a web page [3] which lists items of legislation that are available in both English and Welsh; it has the markup (simplified for this example)
>>> 
>>> <tr class="oddRow">
>>> <td class="bilingual en">The A477 Trunk Road (Backe Road Junction to Llanddowror, Carmarthenshire) (Temporary Traffic Restrictions and Prohibition) Order 2011</td>
>>> <td rowspan="2">
>>>   <a href="/wsi/2011/2469/contents/made">2011 No. 2469</a>
>>> </td>
>>> <td rowspan="2">Wales Statutory Instruments</td>
>>> </tr>
>>> <tr class="oddRow">
>>> <td class="bilingual cy" lang="cy" xml:lang="cy">Gorchymyn Cefnffordd yr A477  (Cyffordd Ffordd Bace i Landdowror, Sir Gaerfyrddin) (Cyfyngiadau a Gwaharddiad Traffig Dros Dro) 2011</td>
>>> </tr>
>>> 
>>> I'd like to indicate that these two table rows related to the same CreativeWork and that it has two titles, one in English and one in Welsh. There doesn't seem to be a way to do this in schema.org.
>>> 
>>> One way that could work would be to introduce a http://schema.org/LanguageString (or something less horrendously named) type and use that as an acceptable value for any natural language property, such as name:
>>> 
>>> <tr class="oddRow" itemscope itemtype="http://schema.org/CreativeWork" itemref="welsh">
>>> <td class="bilingual en">
>>>   <span itemprop="name" itemscope itemtype="http://schema.org/LanguageString">
>>>     <meta itemprop="lang" content="en">
>>>     <span itemprop="value">The A477 Trunk Road (Backe Road Junction to Llanddowror, Carmarthenshire) (Temporary Traffic Restrictions and Prohibition) Order 2011</span>
>>>   </span>
>>> </td>
>>> <td rowspan="2">
>>>   <a itemprop="url" href="/wsi/2011/2469/contents/made">2011 No. 2469</a>
>>> </td>
>>> <td rowspan="2">Wales Statutory Instruments</td>
>>> </tr>
>>> <tr class="oddRow" id="welsh">
>>> <td class="bilingual cy" lang="cy" xml:lang="cy">
>>>   <span itemprop="name" itemscope itemtype="http://schema.org/LanguageString">
>>>     <meta itemprop="lang" content="cy">
>>>     <span itemprop="value">Gorchymyn Cefnffordd yr A477  (Cyffordd Ffordd Bace i Landdowror, Sir Gaerfyrddin) (Cyfyngiadau a Gwaharddiad Traffig Dros Dro) 2011</span>
>>>   </span>
>>> </td>
>>> </tr>
>>> 
>>> Might schema.org introduce a LanguageString class or is there some other method of supplying the language of a property value that's supported by schema.org?
>>> 
>>> Thanks,
>>> 
>>> Jeni
>>> 
>>> [1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=14470#c1
>>> [2] http://schema.org/CreativeWork
>>> [3] http://www.legislation.gov.uk/wsi/2011
>>> --
>>> Jeni Tennison
>>> http://www.jenitennison.com
>>> 
>>> 
>>> 
> 
> -- 
> Jeni Tennison
> http://www.jenitennison.com
> 
> 

Received on Tuesday, 25 October 2011 21:23:24 UTC