Template:According to external metadata

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

according to external metadata

Template documentationview · edit · history · purge ]

This template is used in the “date” parameter of the “Information” template to render the words “according to external metadata” in the language specified in the user's preferences.

The template automatically sets the following categories: corresponding subcategory of

The file type is detected with {{File type}}. The categorization can be suppressed with parameter cat=no (appropriate when the file is manually moved to any subcategory of the default target category, e.g. a country-specific subcategory).

Usage

{{According to external metadata |1= |origdate= |cat= }}

Or use the shorthand
{{AccordingToMetadata|… parameters as described …}}

{{AccordingToMetadata}} without parameters renders just the text in the language specified in the user's preferences: according to external metadata

Template parameters

ParameterDescriptionDefaultStatus
1Date in external metadata in ISO 8601 (YYYY-MM-DD) format, e.g. 2009-02-17 for 17 February 2009.emptyoptional
origdateThe original date entered by the uploader, in ISO 8601 formatemptyoptional
catDisables categorisation if “no”emptyoptional
<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.


Wikipedia's help about TemplateDataCommons-specific information

This template is used in the “date” parameter of the “Information” template to render the words “according to external metadata” in the language specified in the user's preferences.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
1

Date in external metadata in ISO 8601 (YYYY-MM-DD) format, e.g. 2009-02-17 for 17 February 2009.

Unknownoptional
cat

Disables categorisation if “no”

Unknownoptional
origdate

The original date entered by the uploader, in ISO 8601 format

Unknownoptional

Additional information

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

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

Relies on:
{{ISOdate}}

Examples

{{According to external metadata|2024-11-27}}

renders as:

27 November 2024 (according to external metadata)


{{According to external metadata|1970-01-01|origdate={{Other date|beginning|1970}}}}

renders as:

early 1970
date QS:P,+1970-00-00T00:00:00Z/9,P4241,Q40719727
(1 January 1970, according to external metadata)

See also

Localization

To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)