Template:Datatype: Difference between revisions

From Mediawiki1
Jump to navigationJump to search
(added label@ja)
(labels and comments)
Line 5: Line 5:
  <th colspan="2" style="text-align:left">Datatype <small>([[Template:Datatype|<span style="cursor:help;">help</span>]])</small></th>
  <th colspan="2" style="text-align:left">Datatype <small>([[Template:Datatype|<span style="cursor:help;">help</span>]])</small></th>
</tr>
</tr>
{{#if:{{{labels|}}}|{{{labels}}}|
{{#if:{{{rdfs:label@en|}}}||
<tr>
<tr>
  <td width="150px">rdfs:label@en</td>
  <td width="150px">rdfs:label@en</td>
  <td width="400px">{{#if:{{{rdfs:label@en|}}}|{{{rdfs:label@en}}}|<span style="color:red">please define an English label</span>}}</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>
}}
}}
{{#if:{{{rdfs:label@ar|}}}|<tr>
{{#if:{{{rdfs:label@ar|}}}|<tr>
  <td width="150px">rdfs:label@ar</td>
  <td width="150px">rdfs:label@ar</td>
Line 23: Line 29:
  <td>{{{rdfs:label@de}}}</td></tr>}} {{#if:{{{rdfs:label@el|}}}|<tr>
  <td>{{{rdfs:label@de}}}</td></tr>}} {{#if:{{{rdfs:label@el|}}}|<tr>
  <td width="150px">rdfs:label@el</td>
  <td width="150px">rdfs:label@el</td>
  <td>{{{rdfs:label@el}}}</td></tr>}} {{#if:{{{rdfs:label@es|}}}|<tr>
  <td>{{{rdfs:label@el}}}</td></tr>}} {{#if:{{{rdfs:label@en|}}}|<tr>
<td width="150px">rdfs:label@en</td>
<td>{{{rdfs:label@en}}}</td></tr>}} {{#if:{{{rdfs:label@es|}}}|<tr>
  <td width="150px">rdfs:label@es</td>
  <td width="150px">rdfs:label@es</td>
  <td>{{{rdfs:label@es}}}</td></tr>}} {{#if:{{{rdfs:label@fr|}}}|<tr>
  <td>{{{rdfs:label@es}}}</td></tr>}} {{#if:{{{rdfs:label@fr|}}}|<tr>
Line 54: Line 62:
  <td width="150px">rdfs:label@tr</td>
  <td width="150px">rdfs:label@tr</td>
  <td>{{{rdfs:label@tr}}}</td></tr>}}
  <td>{{{rdfs:label@tr}}}</td></tr>}}
{{{comments|}}}
{{#if:{{{rdfs:comment@en|}}}|
<tr>
<tr>
  <td>rdfs:comment@en</td>
  <td>rdfs:comment@en</td>
  <td>{{{rdfs:comment@en|}}}</td>
  <td>{{{rdfs:comment@en}}}</td>
</tr>
</tr>
}}
</table>
</table>
{{#if:{{{specificProperties|}}}|<h3>Specific Properties</h3>
{{#if:{{{specificProperties|}}}|<h3>Specific Properties</h3>
Line 67: Line 78:
<pre>
<pre>
{{Datatype  
{{Datatype  
| labels =
{{label|en|...}}
{{label|..|...}}
| comments =
{{comment|en|...}}
{{comment|..|...}}
}}
</pre>
The second argument of a label or comment is the language code, for example ''en'', ''ko'', ''it'', and so on.
For backwards compatibilty, the following format is also possible but '''deprecated''' for labels and comments:
<pre>
{{Datatype
| rdfs:label@en          =
| rdfs:label@en          =
| rdfs:label@..          =
| rdfs:label@..          =
| rdfs:comment@en        =
| rdfs:comment@en        =
}}
</pre>
</pre>

Revision as of 11:05, 12 May 2012

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

Usage

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

The second argument of a label or comment is the language code, for example en, ko, it, and so on.

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

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