| Vorlagenprogrammierung | Diskussionen | Lua | Test | Unterseiten | |||
| Modul | Deutsch | English | Modul: | Dokumentation | |||
Using the plug-in global a multilingual documentation for an international useful standard template might be shared between projects.
The parameter set should be the same among the various wiki projects, or only slight differences might occur.
Instead of the usual parameter JSON= a special one is to be
provided:
Global=The identifier is specifying a resource in the global repository.
Furthermore necessary local adaptions may be defined by another parameter:
Local=JSON codeData: namespace only..tab format will be assumed; that is “Tabular Data”.The description of the entire table outlines the expected template and links to the related Wikidata entry.
Other formal components (license etc.) meet the usual habits.
The data section specifies mainly the particular template parameters.
The data schema is supposed to define most of the following fields, if required:
| name | type | Remark |
|---|---|---|
name |
string |
mandatory |
label |
localized | |
description |
localized | |
type |
string | |
required |
boolean | |
suggested |
boolean | |
default |
localized | |
example |
localized | |
aliases |
string |
aliases is supposed to be a list of parameters separated by pipe symbols |.deprecated must be of type localized, differing from MediaWiki TemplateData.0 and 1 e.g. in an und language would be converted into boolean.deprecated is exceptional for the global description of a stable template, but might happen one day when some dramatic change arrives.autovalue and inherits as well as style are not expected but possible.Other than with the JSON objects implemented in MediaWiki TemplateData, where the parameters result in a set (associative, map) in arbitrary sequence, here an Array of parameter objects is used. That guarantees exactly the given order of parameters.
The following rules apply:
name is the name of a single template parameter.localized or string shall not be specified for this parameter, the value null may be assigned.schema for all entries. The list might be padded by null items.The parameter name |, which is impossible in template programming, has a special meaning:
description is the purpose description for transclusion users.type specifies the source text format (block/inline).By the parameter Local= of the TemplateData formatting template all global settings may be overwritten locally.
The value is a JSON formatted string in the same format as parameter JSON=, but defines only properties which shall differ locally.
For the parameter list params the following special rules apply:
string values global and/or local.| global | local | Meaning |
|---|---|---|
string |
n/a | Assign the remaining properties to the parameter which is globally specified by the same name value. |
string |
string |
Rename that global parameter accordingly. |
string |
false |
Remove this global parameter definition from local list. |
| n/a | string |
Insert a local parameter at this point into list. |
The sequence in Array defines order in presentation.
For the combination with definitions already present from global data the following rules apply:
localized has been provided, the local value shall be of type localized as well. Present language components will be overwritten, additional language components will be added.