Template:Wikidata alignment/doc
| This is a documentation subpage for Template:Wikidata alignment. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
This template is designed for use in Infobox templates. It will compare the values of locally defined parameters with data available on Wikidata, and report back on whether they are the same or different. If the result is different it will display the Wikidata value alongside the local parameter value, for comparison.
It will also categorise articles accordingly, if desired, in the same manner as Template:Wikidata check.
It is designed for editors rather than readers; therefore its output is hidden by default. To show the output you should add the following to your personal CSS file:
.showwd {display:inline !important;}
The following table shows the output in various circumstances:
| Scenario | Output | Category |
|---|---|---|
| Local parameter matches value on Wikidata | ... same as Wikidata | |
| Local parameter is defined but there is no value on Wikidata | ... not in Wikidata | |
| Local parameter does not match value of Wikidata | ... different from Wikidata | |
| Local parameter not defined; value on Wikidata is used | n/a | |
Local parameter is equivalent to the value on Wikidata, as defined by the |equivalent= parameter
|
... equivalent to Wikidata |
Syntax
{{Wikidata alignment|qid= |property= |local= |category= }}
The parameters are:
qid- if a Wikidata other than that associated with the current article is used, then this should be passed, e.g.|qid=Q76833710property- the associated property ID on Wikidata, e.g.|property=P3920local- pass the value of the local parameter to the template, e.g.|local={{{opened|}}}category- naming scheme of the categories, if required, e.g.|category=Admiralty numberequivalent- Scribunto ustring pattern involving the local parameter to define an equivalent value on Wikidata. See Module:String#match for more detail.- for example
|equivalent=11%d%-{{{NGA}}}was used to say that something of the form "11n-" (where n is a digit) in front of the local value {{{NGA}}} shoul be treated as equivalent.
- for example
Example

This screenshot shows four fields in an infobox.
- The NGA number is defined locally but missing from Wikidata. A link to import this value via QuickStatements is provided.
- The admiralty number is not defined locally, so the Wikidata value is used by default.
- The ARLHS number stored on Wikidata is slightly different to the local value. The Wikidata value is displayed in red alongside.
- The USCG number defined locally matches the local parameter.
See also
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.