Template:Datatype: Difference between revisions

From DBpedia Mappings
Jump to navigationJump to search
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 6: Line 6:
</tr>
</tr>
{{#if:{{{labels|}}}|{{{labels}}}|
{{#if:{{{labels|}}}|{{{labels}}}|
{{#if:{{{rdfs:label@en|}}}||
{{#if:{{{rdfs:label@en|}}}|<!-- no message -->|
<tr>
<tr>
  <td width="150px">rdfs:label@en</td>
  <td colspan="2">please define an English label: <nowiki>labels = {{label|en|...}} ...</nowiki></td>
<td width="400px"><span style="color:red">please define labels</span>, at least for English (en): <nowiki>{{labels|
{{label|en|English label}}
}}</nowiki></td>
</tr>
</tr>
}}
}}
Line 78: Line 75:
<pre>
<pre>
{{Datatype  
{{Datatype  
| labels =
| labels   =
{{label|en|...}}
{{label|en|...}}
{{label|..|...}}
{{label|..|...}}
| comments =
| comments =
{{comment|en|...}}
{{comment|en|...}}
{{comment|..|...}}
{{comment|..|...}}
Line 87: Line 84:
</pre>
</pre>


The second argument of a label or comment is the language code, for example ''en'', ''ko'', ''it'', and so on.
==== Details ====
 
* '''labels''': should be defined to provide a human-readable version of a datatype's name. Use ISO language code 639-1 (e.g. <nowiki>{{label|en|...}}</nowiki>).
* '''comments''': should be defined to provide a human-readable description of a datatype.  Use ISO language code 639-1 (e.g. <nowiki>{{comment|en|...}}</nowiki>).


For backwards compatibilty, the following format for labels and comments is also possible but '''deprecated''':
For backwards compatibilty, the following format for labels and comments is also possible but '''deprecated''':

Latest revision as of 13:49, 12 May 2012

The {{Datatype}} template can be used to define datatypes.

Usage

{{Datatype 
| labels    =
{{label|en|...}}
{{label|..|...}}
| comments  =
{{comment|en|...}}
{{comment|..|...}}
}}

Details

  • labels: should be defined to provide a human-readable version of a datatype's name. Use ISO language code 639-1 (e.g. {{label|en|...}}).
  • comments: should be defined to provide a human-readable description of a datatype. Use ISO language code 639-1 (e.g. {{comment|en|...}}).

For backwards compatibilty, the following format for labels and comments is also possible but deprecated:

{{Datatype
| rdfs:label@en          =
| rdfs:label@..          =
| rdfs:comment@en        =