Template:IfNotTranslation/doc

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


Parameters:
 * 1) any wikitext in the second parameter is used if the page is not a translation (source document)
 * 2) any wikitext in the first parameter is used if the page is a translation (any translation: "/en", "/zh", etc.)

Important note: this template is not exactly the opposite of ifTranslation. This present template do consider the "/en" subpage as a translation (it is triggered by the second parameter), but ifTranslation doesn’t considers the "/en" subpage as a translation (triggered by its second parameter).

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 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  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.