Template:Datatype: Difference between revisions

From Mediawiki1
Jump to navigationJump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 8: Line 8:
{{#if:{{{rdfs:label@en|}}}|<!-- no message -->|
{{#if:{{{rdfs:label@en|}}}|<!-- no message -->|
<tr>
<tr>
  <td colspan="2">please define labels: <code><nowiki>labels = {{label|en|...}} ...</nowiki></code></td>
  <td colspan="2">please define an English label: <nowiki>labels = {{label|en|...}} ...</nowiki></td>
</tr>
</tr>
}}
}}
Line 75: Line 75:
<pre>
<pre>
{{Datatype  
{{Datatype  
| labels =
| labels   =
{{label|en|...}}
{{label|en|...}}
{{label|..|...}}
{{label|..|...}}
| comments =
| comments =
{{comment|en|...}}
{{comment|en|...}}
{{comment|..|...}}
{{comment|..|...}}
Line 84: 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 12: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        =