Template:IfNotTranslation
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 Extension:Translate extension. For translations which are not using Translate, its behavious could be misleading – e.g. if used on Pobočky Wikimedia (unsynchronised Czech translation of 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 Wikipedia Zero Starting Page, then Wikipedia Zero Starting Page will be included in the category Wikipedia Zero, but nor Wikipedia Zero Starting Page/fr nor Wikipedia Zero Starting Page/en will be in the category.
See also
- {{IfTranslation }}