Template:IfNotTranslation/doc: Difference between revisions
[[mw:]]>Shirayuki (important) |
ManfredoDo (talk | contribs) m (1 revision imported: Template documentation pages) |
(No difference)
|
Latest revision as of 18:03, 12 November 2022
This is a documentation subpage for Template:IfNotTranslation. It contains usage information, categories and other content that is not part of the original Template page. |
This template conditionally activate the first parameter if the current page is the source document (hence not a translation), or the second if the current page is a translation subpage.
Usage
{{ifNotTranslation|1|2}}
Parameters:
- any wikitext in the second parameter is used if the page is not a translation (source document)
- any wikitext in the first parameter is used if the page is a translation (any translation: "/en", "/zh", etc.)
Important use case: To conditionally include a category only in the source document, this present template is preferred (else the category would also contain the "/en" subpage).
Warning: This template is intended to be used with the pages translated with the Translate extension. For translations which are not using Translate, its behavious could be misleading – e.g. if used on m:Pobočky Wikimedia (unsynchronised Czech translation of m:Wikimedia chapters) the template will behave as if it was a page in English (not a translation), and if used on a page ending with "/en" it will behave as if it was a source document even if the page is a translation into English from another language.
Example
If the code {{ifNotTranslation|Category:Wikipedia Zero}}
is at the end of the page m:Wikipedia Zero Starting Page, then m:Wikipedia Zero Starting Page will be included in the category Wikipedia Zero, but nor m:Wikipedia Zero Starting Page/fr nor m:Wikipedia Zero Starting Page/en will be in the category.
See also
- {{ifTranslation}}