Template:Templatedata/doc

This template is used to display an enhanced version of the table generated by the  tag from the TemplateData extension. It is to be used in the documentation of templates.

Usage
This parameter takes the TemplateData JSON code. It should always be surrounded by  and , because this allows the TemplateData code to be edited via the graphical user interface (GUI) accessible by clicking the "Manage TemplateData" button above the editor. If no  tag is on the page yet, then the GUI will add it to the end of the documentation text, so it will need to be moved into templatedata in that case. The template processes the TemplateData JSON code and produces a new, invisible  tag, which is "functional" and defines the information used by the Visual Editor. This allows the template to accept slightly more syntax, see below for further information.
 * First unnamed parameter

/639-3 code of the language in which to display the output. This affects both the TemplateData information (if defined for the language) and strings like table headings and labels. If this parameter is omitted, it defaults to the wiki's content language. (Due to Lua restrictions, it cannot default to the user language, i.e. the user's language preference set in Special:Preferences or the value of the uselang URL parameter.) The language determined by this parameter is used in the "functional"  tag; all strings in other languages in the TemplateData JSON code will not be included. (This means that $lang controls the language in which TemplateData information is displayed in the Visual Editor.)
 * lang

Set this parameter to disable the display of the table, e.g. if a manual documentation of the parameters is more practical. The new, invisible, "functional"  tag for the Visual Editor will still be generated.
 * hide

Display the template description (as defined in the TemplateData in $1) above the parameter table; it is not displayed by default. If this parameter is set and no description is defined, an error will be displayed.
 * description

Use this parameter to append the table generated by the functional  tag, in a collapsed wrapper. In this table, the TemplateData information is presented as it is in the Visual Editor. Has no effect if $lazy is set.
 * showRaw

If this parameter is set, then the "functional"  tag will not be created. In that case, the  tag passed in the first unnamed parameter will be the "functional" TemplateData for the Visual Editor (if the value of $1 does include the tag and is not only the pure JSON code). This means that $lang will be ignored for the Visual Editor (i.e. all strings in all languages will be available in the Visual Editor, and the one that is used there depends on the user language), and that the usual restrictions of TemplateData apply, i.e. the expanded syntax features as described below will not be available.
 * lazy