Template:Local template category

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
This category is for translated or localised templates. The main category is located at Category:Commons templates.

[{{fullurl:Template:Local template category/description/{{{1}}}|action=edit}} Please translate this!]
Template documentationview · edit · history · purge ]

This goes at the top of all template categories which contain translated templates.

The template automatically sets the following categories:

Usage

{{Local template category |1= |2= }}

Template parameters

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

This goes at the top of all template categories which contain translated templates.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
language code1

The code of the language of the translated templates

Default
{{SUBPAGENAME}}
Linerequired
main category2

The name of the main category where the non-translated templates are

Default
Commons templates
Linerequired

Additional information

The template is intended to be used in the following namespaces: the Category namespace

The template is intended to be used by the following user groups: all users

Placement: At the top of the page

See also

This template should not be translated. The text inside it is located at Template:Local template category/description and that should be translated. The template will switch out the default text (as seen above) automatically with the translation on that language's category pages. All translations of {{Local template category/description}} should be created as subpages of that page.

For maintenance: Pages which accidental not using the second parameter are listed under Category:Pages using Local template category template with incorrect parameter.