Template:Titlecite/doc
Documentation
This template is called by other templates to format the title part of citations (references). Other templates handle other parts of a citation, like author/publisher information, dates, etc. In particular, see Template:Authordatecite.
Usage
These are some common forms; others are possible. The last form shows all of the possible paramters.
{{titlecite|title=}}{{titlecite|url=|title=}}{{titlecite|url=|title=|local=}}{{titlecite|url=|title=|lang=|trans-title=|trans-title-note=|trans-url=|gt=|local=|local-title=}}
The title must be specified. If there is no obvious title for the resource, just do your best to come up with one that "could have been used". The other parameters are optional, but cases where there is no url should be quite rare (whenever possible, we should be using online resources that readers can check easily).
When the title is not in English, the parameter lang should be used to specify the two- or three-letter ISO 639↗ code of the language it is in (for example, lang=no for Norwegian). Once that has been done, you can use trans-title to provide an English translation of the title and/or either trans-url or gt to link to an online translation of the resource itself. When possible, gt can be used to automatically link to a Google translation, otherwise trans-url can be used to specify the exact URL of the translation.
In the rare case where an English translation is linked to but the title of it is not clearly different from the title of the non-English resource, this can be clarified using the trans-title-note parameter. (See the relevant example below.)
Both url and trans-url (when used) must start with //, https://, or http://).
If this wiki contains an article discussing/summarizing the exact resource being cited, local=y can be used to provide a link to that. This assumes the wiki article is exactly the same as title; if that is not true, then use local-title (set equal to the wiki article title) instead of local=y.
There is also a special parameter not shown above, nocat, which, if set to a true value, prevents any missing-parameter errors from being categorized in Category:Template calls needing input. This should only be done when illustrating bad template calls on template documentation pages, talk pages, or help pages.
Examples
{{titlecite|title=Title}}
⇒ Title.{{titlecite|url=//example.com|title=Title}}
⇒ Title↗.{{titlecite|url=//example.com|title=Title|local=y}}
⇒ Title↗ [local summary].{{titlecite|url=//example.com|title=Tittel|lang=no}}
⇒ Tittel↗ [in Norwegian].{{titlecite|url=//example.com|title=Tittel|lang=no|trans-title=Title}}
⇒ Tittel↗ [in Norwegian] [English: Title].{{titlecite|url=//example.com|title=Tittel|lang=no|trans-title=Title|trans-url=//www.example.com|local-title=Local Title}}
⇒ Tittel↗ [in Norwegian] [Title↗] [local summary].{{titlecite|url=//example.com|title=Festival|lang=no|trans-title=Festival|trans-title-note=in English|trans-url=//www.example.com}}
⇒ Festival↗ [in Norwegian] [Festival↗].
Tests
- Title↗ [in code Lang is unknown to Template:Lang code to en] [Foo↗] [local summary].
See also
Templates that call this one:
{{cite article}}{{cite by URL}}{{cite web}}
Other templates used inside of "cite" templates:
{{authordatecite}}– for formatting author and publication date information in a citation