Template:File caption

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:File caption/doc.

Provide file caption stored in Structured Data on Commons. This function is used by {{Information}} to provide file description in case it is not provided in the template but is available in SDC. Language parameter "lang" works well if there is a caption in that language, than looks for captions in fallback languages including English. If none are found than random language is returned.

Usage

{{File caption |mid= }}

Template parameters

ParameterDescriptionDefaultStatus
midmidentity ID of the SDC page. For a given file can be looked up by:
  • clicking Page information link in the left menu and searching for Mxxxxx in Wikidata entities used in this page section (x's stand for digits)
  • Asdding "M{{PAGEID}}" to the page and hitting Page Preview button, the entity ID should be displayed on the page (please do not hit save)
Entity ID of the current pageoptional
langlangdesired languageuser's languageoptional
iconiconShould an pen icon be displayed linking back to the field where once can edit the caption?trueoptional

Additional information

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

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

Examples

  • {{File caption|mid=M4184419 |lang=en |icon=0}} gives "
    English: A five year old hanging around bouldering wall in Sportrock climbing gym in Alexandria, Virginia, USA
    "
  • {{File caption|mid=M3050001 |lang=pl |icon=1}} gives "
    Polski: Tablica pamiątkowa - Saperom którzy zginęli koło Jasła Edytuj to w Danych Strukturalnych na Commons
    "
  • {{File caption|mid=M3050001 |lang=en |icon=1}} gives "
    Polski: Tablica pamiątkowa - Saperom którzy zginęli koło Jasła Edit this at Structured Data on Commons
    "