「ヘルプ:Magic words」の版間の差分
細 (1版) |
細 (1版 をインポートしました) |
||
(7人の利用者による、間の21版が非表示) | |||
1行目: | 1行目: | ||
<languages/> | <languages/> | ||
+ | {{TOCRight}} | ||
{{TNT|PD Help Page}} | {{TNT|PD Help Page}} | ||
− | <translate> | + | <translate><!--T:1--> |
− | <!--T:1--> | + | '''Magic words''' are strings of text that MediaWiki associates with a return value or function, such as time, site details, or page names. This page explains only the standard magic words; for a technical reference, see {{Mediawiki|<tvar|manual-magic-words>Special:MyLanguage/Manual:Magic words</>|Manual:Magic words}}. |
− | '''Magic words''' are strings of text that MediaWiki associates with a return value or function, such as time, site details, or page names. This page | ||
<!--T:2--> | <!--T:2--> | ||
9行目: | 9行目: | ||
<!--T:3--> | <!--T:3--> | ||
− | * '''[[#Behavior switches|Behavior switches]]''': these are uppercase words surrounded by double underscores, ''e.g.'' '''__FOO__'''. | + | * '''[[<tvar|bs>#Behavior switches</>|Behavior switches]]''': these are uppercase words surrounded by double underscores, ''e.g.'' '''__FOO__'''. |
<!--T:4--> | <!--T:4--> | ||
− | * '''[[#Variables|Variables]]''': these are uppercase words surrounded by double braces, ''e.g.'' '''<code><nowiki>{{FOO}}</nowiki></code>'''. As such, they look a lot like [[<tvar|help-templates>Special:MyLanguage/Help:Templates</>|templates]]. | + | * '''[[<tvar|var>#Variables</>|Variables]]''': these are uppercase words surrounded by double braces, ''e.g.'' '''<code><nowiki>{{FOO}}</nowiki></code>'''. As such, they look a lot like [[<tvar|help-templates>Special:MyLanguage/Help:Templates</>|templates]]. |
<!--T:5--> | <!--T:5--> | ||
− | * '''[[#Parser functions|Parser functions]]''': these take parameters and are either of the form '''<code><nowiki>{{foo:...}}</nowiki></code>''' or '''<code><nowiki>{{#foo:...}}</nowiki></code>'''. See also | + | * '''[[<tvar|pfunc>#Parser functions</>|Parser functions]]''': these take parameters and are either of the form '''<code><nowiki>{{foo:...}}</nowiki></code>''' or '''<code><nowiki>{{#foo:...}}</nowiki></code>'''. See also <tvar|help-ext-parser-functions>{{ll|Help:Extension:ParserFunctions}}</>. |
<!--T:6--> | <!--T:6--> | ||
− | Variables and parser functions can use [[<tvar|manual-subst>Special:MyLanguage/Manual:subst</>|subst:]], just like templates. | + | Variables and parser functions can use [[<tvar|manual-subst>Special:MyLanguage/Manual:subst</>|subst:]], just like templates. Page-dependent magic words will affect or return data about the ''current'' page (by default), even if the word is added through a transcluded template or included system message.</translate> |
− | </translate> | ||
{{anchor|Behavior switches}} | {{anchor|Behavior switches}} | ||
26行目: | 25行目: | ||
<!--T:8--> | <!--T:8--> | ||
− | A behavior switch controls the layout or behavior of the page and can often be used to specify desired omissions and inclusions in the content. | + | A behavior switch controls the layout or behavior of the page and can often be used to specify desired omissions and inclusions in the content.</translate> |
− | </translate> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! <translate><!--T:9--> | + | ! width="20%" | <translate><!--T:9--> |
Word</translate> | Word</translate> | ||
! <translate><!--T:10--> | ! <translate><!--T:10--> | ||
Description</translate> | Description</translate> | ||
− | ! <translate><!--T:11--> | + | ! width="15%" | <translate><!--T:11--> |
Versions</translate> | Versions</translate> | ||
|- | |- | ||
48行目: | 46行目: | ||
| <code><nowiki>__FORCETOC__</nowiki></code> | | <code><nowiki>__FORCETOC__</nowiki></code> | ||
| <translate><!--T:13--> | | <translate><!--T:13--> | ||
− | Forces the table of contents to appear at its normal position (before the first header).</translate> | + | Forces the table of contents to appear at its normal position (before the first header, overriding <tvar|notoc><code><nowiki>__NOTOC__</nowiki></code></>).</translate> |
| | | | ||
|- | |- | ||
61行目: | 59行目: | ||
| <code><nowiki>__NOEDITSECTION__</nowiki></code> | | <code><nowiki>__NOEDITSECTION__</nowiki></code> | ||
| <translate><!--T:16--> | | <translate><!--T:16--> | ||
− | Hides the section edit links beside headings. This is especially useful | + | Hides the section edit links beside headings. This is especially useful where a heading is created from within a template: the normal wiki section-edit would in this case edit the template code, which is normally counterintuitive to the user.</translate> <translate><!--T:345--> |
+ | Use of this in a template will extend the effect to that template, the pages it's included on, ''and'' any other templates included on the same page.</translate> <translate><!--T:346--> | ||
+ | For a workaround, see [[<tvar|meta>m:Special:MyLanguage/Help:Editing sections of included templates</>|here]].</translate> | ||
| | | | ||
|- | |- | ||
67行目: | 67行目: | ||
| <translate><!--T:17--> | | <translate><!--T:17--> | ||
Adds a link beside the "edit" tab for adding a new section on a non-talk page (see {{mediawiki|<tvar|meta-help-section>m:Special:MyLanguage/Help:Section#Adding a section at the end</>|Adding a section to the end}}).</translate> | Adds a link beside the "edit" tab for adding a new section on a non-talk page (see {{mediawiki|<tvar|meta-help-section>m:Special:MyLanguage/Help:Section#Adding a section at the end</>|Adding a section to the end}}).</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>__NONEWSECTIONLINK__</nowiki></code> | | <code><nowiki>__NONEWSECTIONLINK__</nowiki></code> | ||
| <translate><!--T:18--> | | <translate><!--T:18--> | ||
Removes the link beside the "edit" tab on pages in talk namespaces.</translate> | Removes the link beside the "edit" tab on pages in talk namespaces.</translate> | ||
− | | {{MW version|version=1.15|compact=y|comment=and after|r=47522}} | + | | {{ {{TNTN|MW version}} |version=1.15|compact=y|comment=and after|r=47522}} |
|- | |- | ||
! colspan="3"| <translate><!--T:19--> | ! colspan="3"| <translate><!--T:19--> | ||
80行目: | 80行目: | ||
| <translate><!--T:20--> | | <translate><!--T:20--> | ||
Used on a category page, replaces thumbnails in the category view with normal links.</translate> | Used on a category page, replaces thumbnails in the category view with normal links.</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>__HIDDENCAT__</nowiki></code> | | <code><nowiki>__HIDDENCAT__</nowiki></code> | ||
| <translate><!--T:21--> | | <translate><!--T:21--> | ||
Used on a category page, hides the category from the lists of categories in its members and parent categories (there is an option in the [[<tvar|help-preferences>Special:MyLanguage/Help:Preferences</>|user preferences]] to show them).</translate><!-- hiddencategory hiddencat hide category categories --> | Used on a category page, hides the category from the lists of categories in its members and parent categories (there is an option in the [[<tvar|help-preferences>Special:MyLanguage/Help:Preferences</>|user preferences]] to show them).</translate><!-- hiddencategory hiddencat hide category categories --> | ||
− | | {{MW version|version=1.13|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.13|compact=y|comment=and after}} |
|- | |- | ||
! colspan="3" style="background-color: #DDDDDD;"| <translate><!--T:22--> | ! colspan="3" style="background-color: #DDDDDD;"| <translate><!--T:22--> | ||
104行目: | 104行目: | ||
|- | |- | ||
| <code><nowiki>__START__</nowiki></code> | | <code><nowiki>__START__</nowiki></code> | ||
− | | <translate><!--T: | + | | <translate><!--T:347--> |
− | No effect.</translate> | + | No effect.</translate> <translate><!--T:348--> |
− | | | + | Was used to point where database message starts after comment that should not be transcluded.</translate> <small><translate><!--T:26--> |
+ | Removed in [[Special:Code/MediaWiki/1695|r1695]] and completely removed in [[Special:Code/MediaWiki/24784|r24784]]</translate></small> | ||
+ | | {{ {{TNTN|MW version}} |version=1.10|compact=y|comment=and before|r=1610}} | ||
|- | |- | ||
| <code><nowiki>__END__</nowiki></code> | | <code><nowiki>__END__</nowiki></code> | ||
| <translate><!--T:27--> | | <translate><!--T:27--> | ||
Explicitly marks the end of the article, to prevent MediaWiki from removing trailing whitespace. Removed in {{mediawiki|rev:19213|19213}}.</translate> | Explicitly marks the end of the article, to prevent MediaWiki from removing trailing whitespace. Removed in {{mediawiki|rev:19213|19213}}.</translate> | ||
− | | {{MW version|version=1.1|compact=y|version2=1.8}} | + | | {{ {{TNTN|MW version}} |version=1.1|compact=y|version2=1.8}} |
|- | |- | ||
| <code><nowiki>__INDEX__</nowiki></code> | | <code><nowiki>__INDEX__</nowiki></code> | ||
| <translate><!--T:28--> | | <translate><!--T:28--> | ||
Tell search engines to index the page (overrides <tvar|manual-wg-bot-policy>{{mediawiki|Special:MyLanguage/Manual:$wgArticleRobotPolicies|$wgArticleRobotPolicies}}</>, but not robots.txt). It obeys <tvar|manual-wg-exempt-from-bot>[[Special:MyLanguage/Manual:$wgExemptFromUserRobotsControl|$wgExemptFromUserRobotsControl]]</> variable.</translate> | Tell search engines to index the page (overrides <tvar|manual-wg-bot-policy>{{mediawiki|Special:MyLanguage/Manual:$wgArticleRobotPolicies|$wgArticleRobotPolicies}}</>, but not robots.txt). It obeys <tvar|manual-wg-exempt-from-bot>[[Special:MyLanguage/Manual:$wgExemptFromUserRobotsControl|$wgExemptFromUserRobotsControl]]</> variable.</translate> | ||
− | | {{MW version|version=1.14|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.14|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>__NOINDEX__</nowiki></code> | | <code><nowiki>__NOINDEX__</nowiki></code> | ||
| <translate><!--T:29--> | | <translate><!--T:29--> | ||
Tell search engines not to index the page (i.e. do not list in search engines' results). It obeys <tvar|manual-wg-exempt-from-bot>[[Special:MyLanguage/Manual:$wgExemptFromUserRobotsControl|$wgExemptFromUserRobotsControl]]</> variable.</translate> | Tell search engines not to index the page (i.e. do not list in search engines' results). It obeys <tvar|manual-wg-exempt-from-bot>[[Special:MyLanguage/Manual:$wgExemptFromUserRobotsControl|$wgExemptFromUserRobotsControl]]</> variable.</translate> | ||
− | | {{MW version|version=1.14|compact=y|comment=and after|r=37973}} | + | | {{ {{TNTN|MW version}} |version=1.14|compact=y|comment=and after|r=37973}} |
|- | |- | ||
| <code><nowiki>__STATICREDIRECT__</nowiki></code> | | <code><nowiki>__STATICREDIRECT__</nowiki></code> | ||
| <translate><!--T:30--> | | <translate><!--T:30--> | ||
− | On redirect pages, don't allow MediaWiki to automatically update the link when someone moves a page and checks "{{int:Fix-double-redirects}}".</translate> | + | On redirect pages, don't allow MediaWiki to automatically update the link when someone moves a page and checks "<tvar|fixDoubleRedirects>{{int:Fix-double-redirects}}</>" (which requires [[<tvar|var>Special:MyLanguage/Manual:$wgFixDoubleRedirects</>|$wgFixDoubleRedirects]]).</translate> |
− | | {{MW version|version=1.13|compact=y|comment=and after|r=37928}} | + | | {{ {{TNTN|MW version}} |version=1.13|compact=y|comment=and after|r=37928}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
+ | {{anchor|Variables}} | ||
<translate> | <translate> | ||
+ | |||
== Variables == <!--T:33--> | == Variables == <!--T:33--> | ||
143行目: | 141行目: | ||
<!--T:35--> | <!--T:35--> | ||
If a template name conflicts with a variable, the variable will be used (so to transclude the template [[{{ns:10}}:PAGENAME]] you would need to write <tvar|code><code><nowiki>{{</nowiki>{{ns:10}}:</>PAGENAME<tvar|code-end><nowiki>}}</nowiki></code></>). In some cases, adding parameters will force the parser to invoke a template; for example, <tvar|tpl-currentdayname-code><code><nowiki>{{CURRENTDAYNAME|x}}</nowiki></code></> transcludes <tvar|tpl-currentdayname-result>[[{{ns:10}}:CURRENTDAYNAME]]</>, ''not'' the variable. | If a template name conflicts with a variable, the variable will be used (so to transclude the template [[{{ns:10}}:PAGENAME]] you would need to write <tvar|code><code><nowiki>{{</nowiki>{{ns:10}}:</>PAGENAME<tvar|code-end><nowiki>}}</nowiki></code></>). In some cases, adding parameters will force the parser to invoke a template; for example, <tvar|tpl-currentdayname-code><code><nowiki>{{CURRENTDAYNAME|x}}</nowiki></code></> transcludes <tvar|tpl-currentdayname-result>[[{{ns:10}}:CURRENTDAYNAME]]</>, ''not'' the variable. | ||
+ | </translate> | ||
+ | {{anchor|Date and time}} | ||
+ | <translate> | ||
=== Date and time === <!--T:36--> | === Date and time === <!--T:36--> | ||
153行目: | 154行目: | ||
<!--T:39--> | <!--T:39--> | ||
− | The date and time magic words are formatted in the wiki content language. Since {{r|94680|1.19}}, they depend on the [[<tvar|manual-pagelang>Special:MyLanguage/Manual:Language#page-content-lang</>|page content language]]. | + | The date and time magic words are formatted in the wiki content language. Since {{r|94680|1.19}}, they depend on the [[<tvar|manual-pagelang>Special:MyLanguage/Manual:Language#page-content-lang</>|page content language]].</translate> |
− | </translate> | ||
{| class="wikitable" | {| class="wikitable" | ||
177行目: | 177行目: | ||
|- | |- | ||
! colspan="4" style="background-color: #DDDDDD;"| <translate><!--T:46--> | ! colspan="4" style="background-color: #DDDDDD;"| <translate><!--T:46--> | ||
− | Month</translate>{{Anchor|CURRENTMONTH|CURRENTMONTHNAME|CURRENTMONTHNAMEGEN|CURRENTMONTHABBREV}} | + | Month</translate>{{Anchor|CURRENTMONTH|CURRENTMONTH1|CURRENTMONTHNAME|CURRENTMONTHNAMEGEN|CURRENTMONTHABBREV}} |
|- | |- | ||
| <code><nowiki>{{CURRENTMONTH}}</nowiki></code> | | <code><nowiki>{{CURRENTMONTH}}</nowiki></code> | ||
183行目: | 183行目: | ||
| <translate><!--T:47--> | | <translate><!--T:47--> | ||
Month (zero-padded number)</translate> | Month (zero-padded number)</translate> | ||
+ | | | ||
+ | |- | ||
+ | | <code><nowiki>{{CURRENTMONTH1}}</nowiki></code> | ||
+ | | {{CURRENTMONTH1}} | ||
+ | | <translate><!--T:304--> | ||
+ | Month (unpadded number)</translate> | ||
| | | | ||
|- | |- | ||
201行目: | 207行目: | ||
| <translate><!--T:50--> | | <translate><!--T:50--> | ||
Month (abbreviation)</translate> | Month (abbreviation)</translate> | ||
− | | {{MW version|version=1.5|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.5|compact=y|comment=and after}} |
|- | |- | ||
! colspan="4" style="background-color: #DDDDDD;"| <translate><!--T:51--> | ! colspan="4" style="background-color: #DDDDDD;"| <translate><!--T:51--> | ||
216行目: | 222行目: | ||
| <translate><!--T:53--> | | <translate><!--T:53--> | ||
Day of the month (zero-padded number)</translate> | Day of the month (zero-padded number)</translate> | ||
− | | {{MW version|version=1.6|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.6|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{CURRENTDOW}}</nowiki></code> | | <code><nowiki>{{CURRENTDOW}}</nowiki></code> | ||
258行目: | 264行目: | ||
| <translate><!--T:61--> | | <translate><!--T:61--> | ||
YYYYMMDDHHmmss timestamp</translate> | YYYYMMDDHHmmss timestamp</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|} | |} | ||
− | <translate> | + | <translate><!--T:62--> |
− | <!--T:62--> | ||
The following variables do the same as the preceding ones, but using the site's server config or <tvar|manual-wg-localtimezone>[[Special:MyLanguage/Manual:$wgLocaltimezone|$wgLocaltimezone]]</>. | The following variables do the same as the preceding ones, but using the site's server config or <tvar|manual-wg-localtimezone>[[Special:MyLanguage/Manual:$wgLocaltimezone|$wgLocaltimezone]]</>. | ||
</translate> | </translate> | ||
* <code><nowiki>{{LOCALYEAR}}</nowiki> | * <code><nowiki>{{LOCALYEAR}}</nowiki> | ||
* <nowiki>{{LOCALMONTH}}</nowiki> | * <nowiki>{{LOCALMONTH}}</nowiki> | ||
+ | * <nowiki>{{LOCALMONTH1}}</nowiki> | ||
* <nowiki>{{LOCALMONTHNAME}}</nowiki> | * <nowiki>{{LOCALMONTHNAME}}</nowiki> | ||
* <nowiki>{{LOCALMONTHNAMEGEN}}</nowiki> | * <nowiki>{{LOCALMONTHNAMEGEN}}</nowiki> | ||
279行目: | 285行目: | ||
* <nowiki>{{LOCALTIMESTAMP}}</nowiki></code> | * <nowiki>{{LOCALTIMESTAMP}}</nowiki></code> | ||
− | <translate> | + | <translate><!--T:63--> |
− | <!--T:63--> | + | ''For more thorough time formatting, you may want to install <tvar|ext-parserfunctions>{{ll|Extension:ParserFunctions}}</> to use the [[<tvar|ext-parserfunct-t>Special:MyLanguage/Help:Extension:ParserFunctions#.23time</>|#time parser function]]''. |
− | ''For more thorough time formatting, you may want to install | ||
=== Technical metadata === <!--T:64--> | === Technical metadata === <!--T:64--> | ||
<!--T:65--> | <!--T:65--> | ||
− | ''Note:'' Revision variables return data about the '''latest edit to the current page''', even if viewing an older version of the page. | + | ''Note:'' Revision variables return data about the '''latest edit to the current page''', even if viewing an older version of the page.</translate> |
− | </translate> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! <translate><!--T:66--> | + | ! width="10%" | <translate><!--T:66--> |
Variable</translate> | Variable</translate> | ||
− | ! <translate><!--T:67--> | + | ! width="15%" | <translate><!--T:67--> |
Output</translate> | Output</translate> | ||
! <translate><!--T:68--> | ! <translate><!--T:68--> | ||
Description</translate> | Description</translate> | ||
− | ! <translate><!--T:69--> | + | ! width="10%" | <translate><!--T:69--> |
Versions</translate> | Versions</translate> | ||
|- | |- | ||
318行目: | 322行目: | ||
| {{SERVERNAME}} | | {{SERVERNAME}} | ||
| <translate><!--T:73--> | | <translate><!--T:73--> | ||
− | Subdomain and domain name (no longer dependent on <tvar|manual-wg-servername>{{mediawiki|Special:MyLanguage/Manual:$wgServerName|$wgServerName}}</> as of | + | Subdomain and domain name (no longer dependent on <tvar|manual-wg-servername>{{mediawiki|Special:MyLanguage/Manual:$wgServerName|$wgServerName}}</> as of version 1.17).</translate> |
| | | | ||
|- | |- | ||
324行目: | 328行目: | ||
| {{DIRMARK}} <br />{{DIRECTIONMARK}} | | {{DIRMARK}} <br />{{DIRECTIONMARK}} | ||
| <translate><!--T:74--> | | <translate><!--T:74--> | ||
− | Outputs a [[w:Unicode|Unicode]] | + | Outputs a [[w:Unicode|Unicode]] directional mark that matches the wiki's default language's direction (<code>&lrm;</code> on left-to-right wikis, <code>&rlm;</code> on right-to-left wikis), useful in text with multi-directional text. Since {{r|94680|1.19}}, it depends on the [[<tvar|manual-pagelang>Special:MyLanguage/Manual:Language#page-content-lang</>|page content language]].</translate> |
− | | {{MW version|version=1.7|compact=y|comment=and after|r=14442}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after|r=14442}} |
|- | |- | ||
| <code><nowiki>{{SCRIPTPATH}}</nowiki></code> | | <code><nowiki>{{SCRIPTPATH}}</nowiki></code> | ||
337行目: | 341行目: | ||
| <translate><!--T:76--> | | <translate><!--T:76--> | ||
Relative style path (<tvar|manual-wg-stylepath>{{mediawiki|Special:MyLanguage/Manual:$wgStylePath|$wgStylePath}}</>).</translate> | Relative style path (<tvar|manual-wg-stylepath>{{mediawiki|Special:MyLanguage/Manual:$wgStylePath|$wgStylePath}}</>).</translate> | ||
− | | {{MW version|version=1.16|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.16|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{CURRENTVERSION}}</nowiki></code> | | <code><nowiki>{{CURRENTVERSION}}</nowiki></code> | ||
343行目: | 347行目: | ||
| <translate><!--T:77--> | | <translate><!--T:77--> | ||
The wiki's MediaWiki version.</translate> | The wiki's MediaWiki version.</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after|r=14199}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after|r=14199}} |
|- | |- | ||
| <code><nowiki>{{CONTENTLANGUAGE}}</nowiki></code> <br /><code><nowiki>{{CONTENTLANG}}</nowiki></code> | | <code><nowiki>{{CONTENTLANGUAGE}}</nowiki></code> <br /><code><nowiki>{{CONTENTLANG}}</nowiki></code> | ||
349行目: | 353行目: | ||
| <translate><!--T:78--> | | <translate><!--T:78--> | ||
The wiki's default interface language (<tvar|manual-wg-langcode>{{mediawiki|Special:MyLanguage/Manual:$wgLanguageCode|$wgLanguageCode}}</>).</translate> | The wiki's default interface language (<tvar|manual-wg-langcode>{{mediawiki|Special:MyLanguage/Manual:$wgLanguageCode|$wgLanguageCode}}</>).</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after|r=14661}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after|r=14661}} |
|- | |- | ||
− | ! colspan="4" style="background-color: #DDDDDD;"| {{Anchor|Page|PAGEID|PROTECTIONLEVEL}}<translate><!--T:79--> | + | ! colspan="4" style="background-color: #DDDDDD;"| {{Anchor|Page|PAGEID|PROTECTIONLEVEL|PROTECTIONEXPIRY|CASCADINGSOURCES}}<translate><!--T:79--> |
Page</translate> | Page</translate> | ||
|- | |- | ||
358行目: | 362行目: | ||
| <translate><!--T:80--> | | <translate><!--T:80--> | ||
Returns the page identifier.</translate> | Returns the page identifier.</translate> | ||
− | | {{MW version|version=1.20|compact=y|comment=and after|gerrit change=9858}} | + | | {{ {{TNTN|MW version}} |version=1.20|compact=y|comment=and after|gerrit change=9858}} |
|- | |- | ||
| <code><nowiki>{{</nowiki>PROTECTIONLEVEL:<translate><!--T:261--> | | <code><nowiki>{{</nowiki>PROTECTIONLEVEL:<translate><!--T:261--> | ||
365行目: | 369行目: | ||
| <translate><!--T:81--> | | <translate><!--T:81--> | ||
Outputs the protection level (e.g. "autoconfirmed", "sysop") for a given action (e.g. "edit", "move") on the current page. Returns an empty string if not protected.</translate> | Outputs the protection level (e.g. "autoconfirmed", "sysop") for a given action (e.g. "edit", "move") on the current page. Returns an empty string if not protected.</translate> | ||
− | | {{MW version|version=1.15|compact=y|comment=and after|r=45587}} | + | | {{ {{TNTN|MW version}} |version=1.15|compact=y|comment=and after|r=45587}} |
+ | |- | ||
+ | | <code><nowiki>{{</nowiki>PROTECTIONEXPIRY:''<translate><!--T:342--> | ||
+ | action</translate>''}}</code> | ||
+ | | <!-- Leave this empty. --> | ||
+ | | <translate><!--T:343--> | ||
+ | Outputs the protection expiry (e.g. "20160418155030", "infinity") for a given action (e.g. "edit", "move") on the current page.</translate> <translate><!--T:344--> | ||
+ | Returns "infinity" if not protected.</translate> | ||
+ | | {{ {{TNTN|MW version}} |version=1.27|compact=y|comment=and after|gerrit change=255717}} | ||
+ | |- style="background:#FED;" | ||
+ | | <code><nowiki>{{CASCADINGSOURCES}}</nowiki></code> | ||
+ | | <!-- Leave this empty. --> | ||
+ | | '''[<translate><!--T:326--> | ||
+ | Expensive</translate>]''' <translate><!--T:291--> | ||
+ | Returns the sources of any cascading protection acting on the current page. Pages will not return their own title unless they transclude themselves.</translate> | ||
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=104999}} | ||
|- | |- | ||
! colspan="4" style="background-color: #DDDDDD;"| {{Anchor|revision|REVISIONID|REVISIONDAY|REVISIONDAY2|REVISIONMONTH|REVISIONMONTH1|REVISIONYEAR|REVISIONTIMESTAMP|REVISIONUSER}}<translate><!--T:82--> | ! colspan="4" style="background-color: #DDDDDD;"| {{Anchor|revision|REVISIONID|REVISIONDAY|REVISIONDAY2|REVISIONMONTH|REVISIONMONTH1|REVISIONYEAR|REVISIONTIMESTAMP|REVISIONUSER}}<translate><!--T:82--> | ||
374行目: | 393行目: | ||
| <translate><!--T:83--> | | <translate><!--T:83--> | ||
Unique revision ID.</translate> | Unique revision ID.</translate> | ||
− | | {{MW version|version=1.5|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.5|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{REVISIONDAY}}</nowiki></code> | | <code><nowiki>{{REVISIONDAY}}</nowiki></code> | ||
380行目: | 399行目: | ||
| <translate><!--T:84--> | | <translate><!--T:84--> | ||
Day edit was made (unpadded number).</translate> | Day edit was made (unpadded number).</translate> | ||
− | | {{MW version|version=1.8|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.8|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{REVISIONDAY2}}</nowiki></code> | | <code><nowiki>{{REVISIONDAY2}}</nowiki></code> | ||
386行目: | 405行目: | ||
| <translate><!--T:85--> | | <translate><!--T:85--> | ||
Day edit was made (zero-padded number).</translate> | Day edit was made (zero-padded number).</translate> | ||
− | | {{MW version|version=1.8|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.8|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{REVISIONMONTH}}</nowiki></code> | | <code><nowiki>{{REVISIONMONTH}}</nowiki></code> | ||
392行目: | 411行目: | ||
| <translate><!--T:86--> | | <translate><!--T:86--> | ||
Month edit was made (zero-padded number as of {{mediawiki|rev:66200|1.17+}}, unpadded number in prior versions).</translate> | Month edit was made (zero-padded number as of {{mediawiki|rev:66200|1.17+}}, unpadded number in prior versions).</translate> | ||
− | | {{MW version|version=1.8|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.8|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{REVISIONMONTH1}}</nowiki></code> | | <code><nowiki>{{REVISIONMONTH1}}</nowiki></code> | ||
398行目: | 417行目: | ||
| <translate><!--T:87--> | | <translate><!--T:87--> | ||
Month edit was made (unpadded number).</translate> | Month edit was made (unpadded number).</translate> | ||
− | | {{MW version|version=1.17|compact=y|comment=and after|r=66200}} | + | | {{ {{TNTN|MW version}} |version=1.17|compact=y|comment=and after|r=66200}} |
|- | |- | ||
| <code><nowiki>{{REVISIONYEAR}}</nowiki></code> | | <code><nowiki>{{REVISIONYEAR}}</nowiki></code> | ||
404行目: | 423行目: | ||
| <translate><!--T:88--> | | <translate><!--T:88--> | ||
Year edit was made.</translate> | Year edit was made.</translate> | ||
− | | {{MW version|version=1.8|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.8|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{REVISIONTIMESTAMP}}</nowiki></code> | | <code><nowiki>{{REVISIONTIMESTAMP}}</nowiki></code> | ||
410行目: | 429行目: | ||
| <translate><!--T:89--> | | <translate><!--T:89--> | ||
Timestamp as of time of edit.</translate> | Timestamp as of time of edit.</translate> | ||
− | | {{MW version|version=1.8|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.8|compact=y|comment=and after}} |
|- | |- | ||
− | | <code><nowiki>{{REVISIONUSER | + | | <code><nowiki>{{REVISIONUSER}}</nowiki></code> |
− | | {{REVISIONUSER | + | | {{REVISIONUSER}} |
| <translate><!--T:90--> | | <translate><!--T:90--> | ||
The username of the user who made the most recent edit to the page, or the current user when previewing an edit.</translate> | The username of the user who made the most recent edit to the page, or the current user when previewing an edit.</translate> | ||
− | | {{MW version|version=1.15|compact=y|comment=and after|r=48149}} | + | | {{ {{TNTN|MW version}} |version=1.15|compact=y|comment=and after|r=48149}} |
|- | |- | ||
| <code><nowiki>{{REVISIONSIZE}}</nowiki></code> | | <code><nowiki>{{REVISIONSIZE}}</nowiki></code> | ||
422行目: | 441行目: | ||
| <translate><!--T:91--> | | <translate><!--T:91--> | ||
The size (bytes of wikitext) of the current revision of this page</translate> | The size (bytes of wikitext) of the current revision of this page</translate> | ||
− | | {{MW version|version=1.22|compact=y|comment=and after|gerrit change=82650}} | + | | {{ {{TNTN|MW version}} |version=1.22|compact=y|comment=and after|gerrit change=82650}} |
|- | |- | ||
! colspan="4" style="background-color: #DDDDDD;"| {{Anchor|DISPLAYTITLE|DEAFULTSORT|DEFAULTCATEGORYSORT|DEFAULTSORTKEY}}<translate><!--T:92--> | ! colspan="4" style="background-color: #DDDDDD;"| {{Anchor|DISPLAYTITLE|DEAFULTSORT|DEFAULTCATEGORYSORT|DEFAULTSORTKEY}}<translate><!--T:92--> | ||
431行目: | 450行目: | ||
| | | | ||
| <translate><!--T:93--> | | <translate><!--T:93--> | ||
− | Format the current page's title header. The value must be equivalent to the default title: only capitalization changes and replacing spaces with underscores are allowed (this can be changed with <tvar|manual-wg-restrict-disp-title>{{mediawiki|Special:MyLanguage/Manual:$wgRestrictDisplayTitle|$wgRestrictDisplayTitle}}</>). It can be disabled or enabled by <tvar|manual-wg-allow-disp-title>{{mediawiki|Special:MyLanguage/Manual:$wgAllowDisplayTitle|$wgAllowDisplayTitle}}</>; disabled by default before 1.10+, enabled by default thereafter.</translate> | + | Format the current page's title header. The value must be equivalent to the default title: only capitalization changes to certain parts of the title (not all) and replacing spaces with underscores are allowed (this can be changed with <tvar|manual-wg-restrict-disp-title>{{mediawiki|Special:MyLanguage/Manual:$wgRestrictDisplayTitle|$wgRestrictDisplayTitle}}</>). It can be disabled or enabled by <tvar|manual-wg-allow-disp-title>{{mediawiki|Special:MyLanguage/Manual:$wgAllowDisplayTitle|$wgAllowDisplayTitle}}</>; disabled by default before 1.10+, enabled by default thereafter.</translate> |
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | <translate><!--T:300--> |
+ | It can take a second argument of ''noerror'' or ''noreplace'' to suppress error messages when multiple displaytitles are used on one page or to make this <tt>displaytitle</tt> do nothing if a <tt>displaytitle</tt> was already specified earlier in the page.</translate> | ||
+ | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}}<br/>{{ {{TNTN|MW version}} |version=1.24|compact=y|comment=and after|gerrit change=144870}} <br /> (<translate><!--T:299--> | ||
+ | for noerror and noreplace</translate>) | ||
|- | |- | ||
| {{anchor|Defaultsort}} <code><nowiki>{{DEFAULTSORT:</nowiki><translate><!--T:263--> | | {{anchor|Defaultsort}} <code><nowiki>{{DEFAULTSORT:</nowiki><translate><!--T:263--> | ||
438行目: | 460行目: | ||
| | | | ||
| <translate><!--T:94--> | | <translate><!--T:94--> | ||
− | Used for categorizing pages, sets a default [[<tvar|help-categories>Special:MyLanguage/Help:Categories</>|category sort key]]. For example if you put <tvar|sort><code><nowiki>{{DEFAULTSORT:</>Smith, John<tvar|sort-end>}}</nowiki></code></> at the end of [[John Smith]], the page would be sorted under "S" by default in categories. It can take a second argument of ''noerror'' or ''noreplace'' to suppress error messages when multiple defaultsortkeys are used on one page or to make this <tvar|sort2><tt>defaultsort</tt></> do nothing if a <tvar|sort3><tt>defaultsort</tt></> was already specified earlier in the page.</translate> | + | Used for categorizing pages, sets a default [[<tvar|help-categories>Special:MyLanguage/Help:Categories</>|category sort key]]. For example if you put <tvar|sort><code><nowiki>{{DEFAULTSORT:</>Smith , John<tvar|sort-end>}}</nowiki></code></> at the end of [[John Smith]], the page would be sorted under "S" by default in categories. It can take a second argument of ''noerror'' or ''noreplace'' to suppress error messages when multiple defaultsortkeys are used on one page or to make this <tvar|sort2><tt>defaultsort</tt></> do nothing if a <tvar|sort3><tt>defaultsort</tt></> was already specified earlier in the page.</translate> |
− | | {{MW version|version=1.10|compact=y|comment=and after}}<br/>{{MW version|version=1.19|compact=y|comment=and after|r=96767}} <br /> (<translate><!--T:95--> | + | | {{ {{TNTN|MW version}} |version=1.10|compact=y|comment=and after}}<br/>{{ {{TNTN|MW version}} |version=1.19|compact=y|comment=and after|r=96767}} <br /> (<translate><!--T:95--> |
for noerror and noreplace</translate>) | for noerror and noreplace</translate>) | ||
|} | |} | ||
448行目: | 470行目: | ||
<!--T:97--> | <!--T:97--> | ||
− | Numbers returned by these variables normally contain separators (commas, dots or spaces, depending on the local language) | + | Numbers returned by these variables normally contain separators (commas, dots or spaces, depending on the local language) but can return raw numbers with the ":R" flag (for example, <tvar|nop-code><code><nowiki>{{NUMBEROFPAGES}}</nowiki></code></> → <tvar|nop-result>{{NUMBEROFPAGES}}</> and <tvar|nop-r-code><code><nowiki>{{NUMBEROFPAGES:R}}</nowiki></code></> → <tvar|nop-r-result>{{NUMBEROFPAGES:R}}</>). |
<!--T:98--> | <!--T:98--> | ||
454行目: | 476行目: | ||
<!--T:99--> | <!--T:99--> | ||
− | The number magic words are formatted in the wiki content language. Since {{r|94680|1.19}}, it depends on the [[<tvar|manual-pagelang>Special:MyLanguage/Manual:Language#page-content-lang</>|page content language]]. | + | The number magic words are formatted in the wiki content language. Since {{r|94680|1.19}}, it depends on the [[<tvar|manual-pagelang>Special:MyLanguage/Manual:Language#page-content-lang</>|page content language]].</translate> |
− | </translate> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! <translate><!--T:100--> | + | ! width="10%" | <translate><!--T:100--> |
Variable</translate> | Variable</translate> | ||
− | ! <translate><!--T:101--> | + | ! width="10%" | <translate><!--T:101--> |
Output</translate> | Output</translate> | ||
! <translate><!--T:102--> | ! <translate><!--T:102--> | ||
Description</translate> | Description</translate> | ||
− | ! <translate><!--T:103--> | + | ! width="10%" | <translate><!--T:103--> |
Versions</translate> | Versions</translate> | ||
|- | |- | ||
472行目: | 493行目: | ||
| {{Anchor|NUMBEROFPAGES}}<translate><!--T:104--> | | {{Anchor|NUMBEROFPAGES}}<translate><!--T:104--> | ||
Number of wiki pages.</translate> | Number of wiki pages.</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{NUMBEROFARTICLES}}</nowiki></code> | | <code><nowiki>{{NUMBEROFARTICLES}}</nowiki></code> | ||
484行目: | 505行目: | ||
| {{Anchor|NUMBEROFFILES}}<translate><!--T:106--> | | {{Anchor|NUMBEROFFILES}}<translate><!--T:106--> | ||
Number of uploaded files.</translate> | Number of uploaded files.</translate> | ||
− | | {{MW version|version=1.5|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.5|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{NUMBEROFEDITS}}</nowiki></code> | | <code><nowiki>{{NUMBEROFEDITS}}</nowiki></code> | ||
490行目: | 511行目: | ||
| {{Anchor|NUMBEROFEDITS}}<translate><!--T:107--> | | {{Anchor|NUMBEROFEDITS}}<translate><!--T:107--> | ||
Number of wiki edits.</translate> | Number of wiki edits.</translate> | ||
− | | {{MW version|version=1.10|compact=y|comment=and after|r=21319}} | + | | {{ {{TNTN|MW version}} |version=1.10|compact=y|comment=and after|r=21319}} |
|- | |- | ||
| <code><nowiki>{{NUMBEROFVIEWS}}</nowiki></code> | | <code><nowiki>{{NUMBEROFVIEWS}}</nowiki></code> | ||
− | | | + | | |
| {{Anchor|NUMBEROFVIEWS}}<translate><!--T:108--> | | {{Anchor|NUMBEROFVIEWS}}<translate><!--T:108--> | ||
− | Number of page views. Usually useless on a wiki using [[<tvar|manual-cache>Special:MyLanguage/Manual:Cache</>|caching]].</translate> | + | Number of page views. Usually useless on a wiki using [[<tvar|manual-cache>Special:MyLanguage/Manual:Cache</>|caching]].</translate> <translate><!--T:303--> |
− | | {{MW version|version=1.14|compact=y| | + | Removed in <tvar|gerrit>{{gerrit|150699}}</>.</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.14|compact=y|version2=1.24|r=42721}} | ||
|- | |- | ||
| <code><nowiki>{{NUMBEROFUSERS}}</nowiki></code> | | <code><nowiki>{{NUMBEROFUSERS}}</nowiki></code> | ||
502行目: | 524行目: | ||
| {{Anchor|NUMBEROFUSERS}}<translate><!--T:109--> | | {{Anchor|NUMBEROFUSERS}}<translate><!--T:109--> | ||
Number of registered users.</translate> | Number of registered users.</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{NUMBEROFADMINS}}</nowiki></code> | | <code><nowiki>{{NUMBEROFADMINS}}</nowiki></code> | ||
508行目: | 530行目: | ||
| {{Anchor|NUMBEROFADMINS}}<translate><!--T:110--> | | {{Anchor|NUMBEROFADMINS}}<translate><!--T:110--> | ||
Number of users in the ''sysop'' {{mediawiki|<tvar|manual-userrights>Special:MyLanguage/Manual:User rights</>|group}}.</translate> | Number of users in the ''sysop'' {{mediawiki|<tvar|manual-userrights>Special:MyLanguage/Manual:User rights</>|group}}.</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{NUMBEROFACTIVEUSERS}}</nowiki></code> | | <code><nowiki>{{NUMBEROFACTIVEUSERS}}</nowiki></code> | ||
514行目: | 536行目: | ||
| {{Anchor|NUMBEROFACTIVEUSERS}}<translate><!--T:111--> | | {{Anchor|NUMBEROFACTIVEUSERS}}<translate><!--T:111--> | ||
Number of active users, based on the criteria used in [[Special:Statistics]].</translate> | Number of active users, based on the criteria used in [[Special:Statistics]].</translate> | ||
− | | {{MW version|version=1.15|compact=y|comment=and after|r=47392}} | + | | {{ {{TNTN|MW version}} |version=1.15|compact=y|comment=and after|r=47392}} |
|- style="background:#FED;" | |- style="background:#FED;" | ||
| {{Anchor|PAGESINCATEGORY|PAGESINCAT}}<code><nowiki>{{PAGESINCATEGORY:</nowiki>''categoryname''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{PAGESINCAT:</nowiki>''categoryname''<nowiki>}}</nowiki></code> | | {{Anchor|PAGESINCATEGORY|PAGESINCAT}}<code><nowiki>{{PAGESINCATEGORY:</nowiki>''categoryname''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{PAGESINCAT:</nowiki>''categoryname''<nowiki>}}</nowiki></code> | ||
| {{PAGESINCATEGORY:Help}} <br />{{PAGESINCAT:Help}} | | {{PAGESINCATEGORY:Help}} <br />{{PAGESINCAT:Help}} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:327--> |
− | + | Expensive</translate>]''' <translate><!--T:112--> | |
− | | {{MW version|version=1.13|compact=y|comment=and after|r=32932}} | + | Number of pages (including subcategories and files) in the given [[<tvar|help-categories>Special:MyLanguage/Help:Categories</>|category]]. <small>([[:Category:Help]] used for demonstration)</small></translate> |
+ | | {{ {{TNTN|MW version}} |version=1.13|compact=y|comment=and after|r=32932}} | ||
|- style="background:#FED;" | |- style="background:#FED;" | ||
| <code><nowiki>{{PAGESINCATEGORY:</nowiki><translate><!--T:264--> | | <code><nowiki>{{PAGESINCATEGORY:</nowiki><translate><!--T:264--> | ||
''categoryname''<tvar|code1><nowiki>|all}}</nowiki></code> <br /><code><nowiki>{{PAGESINCATEGORY:</nowiki></>''categoryname''<tvar|code2><nowiki>|pages}}</nowiki></code> <br /><code><nowiki>{{PAGESINCATEGORY:</nowiki></>''categoryname''<tvar|code3><nowiki>|subcats}}</nowiki></code> <br /><code><nowiki>{{PAGESINCATEGORY:</nowiki></>''categoryname''</translate><nowiki>|files}}</nowiki></code> | ''categoryname''<tvar|code1><nowiki>|all}}</nowiki></code> <br /><code><nowiki>{{PAGESINCATEGORY:</nowiki></>''categoryname''<tvar|code2><nowiki>|pages}}</nowiki></code> <br /><code><nowiki>{{PAGESINCATEGORY:</nowiki></>''categoryname''<tvar|code3><nowiki>|subcats}}</nowiki></code> <br /><code><nowiki>{{PAGESINCATEGORY:</nowiki></>''categoryname''</translate><nowiki>|files}}</nowiki></code> | ||
| {{PAGESINCATEGORY:Help|all}} <br />{{PAGESINCATEGORY:Help|pages}} <br />{{PAGESINCATEGORY:Help|subcats}} <br />{{PAGESINCATEGORY:Help|files}} | | {{PAGESINCATEGORY:Help|all}} <br />{{PAGESINCATEGORY:Help|pages}} <br />{{PAGESINCATEGORY:Help|subcats}} <br />{{PAGESINCATEGORY:Help|files}} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:328--> |
− | + | Expensive</translate>]''' <translate><!--T:113--> | |
+ | Respectively, the number of | ||
* all pages | * all pages | ||
* ordinary pages (excluding subcategories and files) | * ordinary pages (excluding subcategories and files) | ||
* subcategories or | * subcategories or | ||
* files | * files | ||
− | in the given [[<tvar|help-categories>Special:MyLanguage/Help:Categories</>|category]].</translate> | + | in the given [[<tvar|help-categories>Special:MyLanguage/Help:Categories</>|category]]. <small>([[:Category:Help]] used for demonstration)</small></translate> |
− | | {{MW version|version=1.20|compact=y|comment=and after|gerrit change=12790}} | + | | {{ {{TNTN|MW version}} |version=1.20|compact=y|comment=and after|gerrit change=12790}} |
|- | |- | ||
| <code><nowiki>{{NUMBERINGROUP:</nowiki><translate><!--T:265--> | | <code><nowiki>{{NUMBERINGROUP:</nowiki><translate><!--T:265--> | ||
539行目: | 563行目: | ||
| <translate><!--T:114--> | | <translate><!--T:114--> | ||
Number of users in a specific {{mediawiki|<tvar|manual-userrights>Special:MyLanguage/Manual:User rights</>|group}}.</translate> | Number of users in a specific {{mediawiki|<tvar|manual-userrights>Special:MyLanguage/Manual:User rights</>|group}}.</translate> | ||
− | | {{MW version|version=1.14|compact=y|comment=and after|r=40116}} | + | | {{ {{TNTN|MW version}} |version=1.14|compact=y|comment=and after|r=40116}} |
|- style="background:#FED;" | |- style="background:#FED;" | ||
| <code><nowiki>{{PAGESINNS:</nowiki><translate><!--T:266--> | | <code><nowiki>{{PAGESINNS:</nowiki><translate><!--T:266--> | ||
545行目: | 569行目: | ||
| <translate><!--T:115--> | | <translate><!--T:115--> | ||
''Not enabled''</translate> | ''Not enabled''</translate> | ||
− | | {{Anchor|PAGESINNS|PAGESINNAMESPACE}}<translate><!--T: | + | | {{Anchor|PAGESINNS|PAGESINNAMESPACE}} '''[<translate><!--T:329--> |
− | + | Expensive</translate>]''' <translate><!--T:116--> | |
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | Number of pages in the given [[<tvar|help-ns>Special:MyLanguage/Help:Namespaces</>|namespace]] (replace ''index'' with the relevant [[<tvar|manual-ns>Special:MyLanguage/Manual:Namespace</>|namespace index]]). For instance, <tvar|pins14><code><nowiki>{{PAGESINNAMESPACE:</nowiki>''14''<nowiki>}}</nowiki></code></> will output the number of category pages. <tvar|pins0><code><nowiki>{{PAGESINNS:0}}</nowiki></code></> differs from <tvar|noa><code><nowiki>{{NUMBEROFARTICLES}}</nowiki></code></> in that the former includes redirects and disambiguation pages. Disabled by default, enable with <tvar|manual-wg-allow-slow-parser-funct>{{mediawiki|Special:MyLanguage/Manual:$wgAllowSlowParserFunctions|$wgAllowSlowParserFunctions}}</>. </translate> |
+ | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} | ||
|} | |} | ||
{{Anchor|Page-names|Page names}} | {{Anchor|Page-names|Page names}} | ||
<translate> | <translate> | ||
+ | |||
=== Page names === <!--T:117--> | === Page names === <!--T:117--> | ||
</translate> | </translate> | ||
557行目: | 583行目: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! <translate><!--T:118--> | + | ! width="10%" | <translate><!--T:118--> |
Variable</translate> | Variable</translate> | ||
− | ! <translate><!--T:119--> | + | ! width="10%" | <translate><!--T:119--> |
Output</translate> | Output</translate> | ||
! <translate><!--T:120--> | ! <translate><!--T:120--> | ||
Description</translate> | Description</translate> | ||
− | ! <translate><!--T:121--> | + | ! width="10%" | <translate><!--T:121--> |
Versions</translate> | Versions</translate> | ||
|- | |- | ||
570行目: | 596行目: | ||
| <translate><!--T:122--> | | <translate><!--T:122--> | ||
Namespace and full page title (including all subpage levels).</translate> | Namespace and full page title (including all subpage levels).</translate> | ||
− | | {{MW version|version=1.6|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.6|compact=y|comment=and after}} |
|- | |- | ||
| {{Anchor|PAGENAME|pagename}}<code><nowiki>{{PAGENAME}}</nowiki></code> | | {{Anchor|PAGENAME|pagename}}<code><nowiki>{{PAGENAME}}</nowiki></code> | ||
585行目: | 611行目: | ||
<!--T:260--> | <!--T:260--> | ||
For more complex splitting, use <tvar|help-ext-pf-titleparts><code><nowiki>{{</nowiki>[[Special:MyLanguage/Help:Extension:ParserFunctions#.23titleparts|#titleparts:]]<nowiki>}}</nowiki></code></> from the [[<tvar|help-ext-pf>Special:MyLanguage/Help:Extension:ParserFunctions</>|ParserFunctions extension]].</translate> | For more complex splitting, use <tvar|help-ext-pf-titleparts><code><nowiki>{{</nowiki>[[Special:MyLanguage/Help:Extension:ParserFunctions#.23titleparts|#titleparts:]]<nowiki>}}</nowiki></code></> from the [[<tvar|help-ext-pf>Special:MyLanguage/Help:Extension:ParserFunctions</>|ParserFunctions extension]].</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|- | |- | ||
| {{Anchor|SUBPAGENAME|subpagename}}<code><nowiki>{{SUBPAGENAME}}</nowiki></code> | | {{Anchor|SUBPAGENAME|subpagename}}<code><nowiki>{{SUBPAGENAME}}</nowiki></code> | ||
591行目: | 617行目: | ||
| <translate><!--T:125--> | | <translate><!--T:125--> | ||
The [[<tvar|help-subpages>Special:MyLanguage/Help:Subpages</>|subpage]] title ("bar" on "Help:Title/foo/bar").</translate> | The [[<tvar|help-subpages>Special:MyLanguage/Help:Subpages</>|subpage]] title ("bar" on "Help:Title/foo/bar").</translate> | ||
− | | {{MW version|version=1.6|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.6|compact=y|comment=and after}} |
|- | |- | ||
| {{Anchor|SUBJECTPAGENAME|ARTICLEPAGENAME|subjectpagename|articlepagename}}<code><nowiki>{{SUBJECTPAGENAME}}</nowiki></code> <br/><code><nowiki>{{ARTICLEPAGENAME}}</nowiki></code> | | {{Anchor|SUBJECTPAGENAME|ARTICLEPAGENAME|subjectpagename|articlepagename}}<code><nowiki>{{SUBJECTPAGENAME}}</nowiki></code> <br/><code><nowiki>{{ARTICLEPAGENAME}}</nowiki></code> | ||
597行目: | 623行目: | ||
| <translate><!--T:126--> | | <translate><!--T:126--> | ||
Full page name of the associated subject (e.g. article or file). Useful on talk pages.</translate> | Full page name of the associated subject (e.g. article or file). Useful on talk pages.</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|- | |- | ||
| {{Anchor|TALKPAGENAME|talkpagename}}<code><nowiki>{{TALKPAGENAME}}</nowiki></code> | | {{Anchor|TALKPAGENAME|talkpagename}}<code><nowiki>{{TALKPAGENAME}}</nowiki></code> | ||
603行目: | 629行目: | ||
| <translate><!--T:127--> | | <translate><!--T:127--> | ||
Full page name of the associated talk page.</translate> | Full page name of the associated talk page.</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
+ | |- | ||
+ | | {{Anchor|ROOTPAGENAME|rootpagename}}<code><nowiki>{{ROOTPAGENAME}}</nowiki></code> | ||
+ | | {{ROOTPAGENAME}} | ||
+ | | <translate><!--T:301--> | ||
+ | Name of the root of the current page.</translate> <translate><!--T:302--> | ||
+ | Would return <tvar|foo><code>Title</code></> on page <tvar|baz><code>Help:Title/Foo/Bar</code></></translate> | ||
+ | | {{ {{TNTN|MW version}} |version=1.22|compact=y|comment=and after}} | ||
|} | |} | ||
− | <translate> | + | <translate><!--T:128--> |
− | <!--T:128--> | ||
The <tvar|basepagename><code><nowiki>{{BASEPAGENAME}}</nowiki></code></> and <tvar|subpagename><code><nowiki>{{SUBPAGENAME}}</nowiki></code></> magic words only work in namespaces that have subpages enabled. See <tvar|manual-wg-ns-with-subpages>{{mediawiki|Special:MyLanguage/Manual:$wgNamespacesWithSubpages|$wgNamespacesWithSubpages}}</> for information on enabling subpages. | The <tvar|basepagename><code><nowiki>{{BASEPAGENAME}}</nowiki></code></> and <tvar|subpagename><code><nowiki>{{SUBPAGENAME}}</nowiki></code></> magic words only work in namespaces that have subpages enabled. See <tvar|manual-wg-ns-with-subpages>{{mediawiki|Special:MyLanguage/Manual:$wgNamespacesWithSubpages|$wgNamespacesWithSubpages}}</> for information on enabling subpages. | ||
613行目: | 645行目: | ||
As of {{mediawiki|rev:46662|1.15+}}, these can all take a parameter, allowing specification of the page to be operated on, instead of just the current page: | As of {{mediawiki|rev:46662|1.15+}}, these can all take a parameter, allowing specification of the page to be operated on, instead of just the current page: | ||
* <tvar|code><code><nowiki>{{PAGENAME:Template:Main Page}}</nowiki></code></> → '''<tvar|result>{{PAGENAME:Template:Main Page}}</>''' | * <tvar|code><code><nowiki>{{PAGENAME:Template:Main Page}}</nowiki></code></> → '''<tvar|result>{{PAGENAME:Template:Main Page}}</>''' | ||
+ | </translate> | ||
− | <!--T:130--> | + | {{TNT|Warning}} <translate><!--T:130--> |
− | + | Page titles containing certain characters, such as apostrophes <code>'</code> or asterisks <code>*</code>, may produce unexpected results when handled with these magic words, e.g. <tvar|pic><code><nowiki>{{PAGESINCATEGORY:{{PAGENAME}}}}</nowiki></code></>. See bugs {{mediawiki|phabricator:T16779|T16779}}, {{mediawiki|phabricator:T18474|T18474}}, {{mediawiki|phabricator:T37628|T37628}}, and {{mediawiki|phabricator:T37746|T37746}}. One simple way to fix this is wrapping the pagename in <tvar|titleparts><code><nowiki>{{</nowiki>[[Special:MyLanguage/Help:Extension:ParserFunctions#.23titleparts|#titleparts:]]<nowiki>}}</nowiki></code></> from the [[<tvar|help-ext-pf>Special:MyLanguage/Help:Extension:ParserFunctions</>|ParserFunctions extension]].</translate> | |
+ | <translate> | ||
<!--T:131--> | <!--T:131--> | ||
For example, if page name is "<tvar|pagename>L'Aquila</>", the following code will produce the string "<tvar|result>Numeric char encoding</>": | For example, if page name is "<tvar|pagename>L'Aquila</>", the following code will produce the string "<tvar|result>Numeric char encoding</>": | ||
631行目: | 665行目: | ||
<!--T:134--> | <!--T:134--> | ||
− | The following are equivalents encoded for use in MediaWiki URLs (i.e. spaces replaced with underscores and some characters [[wikipedia:Numeric character reference|HTML escaped using numeric character encoding]]): | + | The following are equivalents encoded for use in MediaWiki URLs (i.e. spaces replaced with underscores and some characters [[wikipedia:Numeric character reference|HTML escaped using numeric character encoding]]):</translate> |
− | </translate> | ||
* <code><nowiki>{{FULLPAGENAMEE}}</nowiki> | * <code><nowiki>{{FULLPAGENAMEE}}</nowiki> | ||
640行目: | 673行目: | ||
* <nowiki>{{SUBJECTPAGENAMEE}}</nowiki> | * <nowiki>{{SUBJECTPAGENAMEE}}</nowiki> | ||
* <nowiki>{{ARTICLEPAGENAMEE}}</nowiki> | * <nowiki>{{ARTICLEPAGENAMEE}}</nowiki> | ||
− | * <nowiki>{{TALKPAGENAMEE}}</nowiki></code> | + | * <nowiki>{{TALKPAGENAMEE}}</nowiki> |
+ | * <nowiki>{{ROOTPAGENAMEE}}</nowiki></code> | ||
+ | |||
+ | <translate><!--T:135--> | ||
+ | Note that <tvar|pagename><code><nowiki>{{PAGENAME:...}}</nowiki></code></>, <tvar|pagenamee><code><nowiki>{{PAGENAMEE:...}}</nowiki></code></> and <tvar|uec><code><nowiki>{{urlencode:...}}</nowiki></code></> have distinct implementations. See [[<tvar|manual-pagename-encoding>Special:MyLanguage/Manual:PAGENAMEE encoding</>|Manual:PAGENAMEE encoding]] for details. | ||
+ | </translate> | ||
+ | {{anchor|Namespaces}} | ||
<translate> | <translate> | ||
− | |||
− | |||
=== Namespaces === <!--T:136--> | === Namespaces === <!--T:136--> | ||
670行目: | 707行目: | ||
| <translate><!--T:142--> | | <translate><!--T:142--> | ||
[[<tvar|manual-ns-id>Special:MyLanguage/Manual:Namespace#Built-in_namespaces</>|ID]] of the page's namespace</translate> | [[<tvar|manual-ns-id>Special:MyLanguage/Manual:Namespace#Built-in_namespaces</>|ID]] of the page's namespace</translate> | ||
− | | {{MW version|version=1.20|compact=y|comment=and after|gerrit change=4056}} | + | | {{ {{TNTN|MW version}} |version=1.20|compact=y|comment=and after|gerrit change=4056}} |
|- | |- | ||
| <code><nowiki>{{SUBJECTSPACE}}</nowiki></code> <br /><code><nowiki>{{ARTICLESPACE}}</nowiki></code> | | <code><nowiki>{{SUBJECTSPACE}}</nowiki></code> <br /><code><nowiki>{{ARTICLESPACE}}</nowiki></code> | ||
676行目: | 713行目: | ||
| <translate><!--T:143--> | | <translate><!--T:143--> | ||
Name of the associated content namespace</translate> | Name of the associated content namespace</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{TALKSPACE}}</nowiki></code> | | <code><nowiki>{{TALKSPACE}}</nowiki></code> | ||
682行目: | 719行目: | ||
| <translate><!--T:144--> | | <translate><!--T:144--> | ||
Name of the associated talk namespace</translate> | Name of the associated talk namespace</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|} | |} | ||
− | <translate> | + | <translate><!--T:145--> |
− | <!--T:145--> | + | The following are equivalents encoded for use in MediaWiki URLs (spaces replaced with underscores and some characters percent-encoded):</translate> |
− | The following are equivalents encoded for use in MediaWiki URLs (spaces replaced with underscores and some characters percent-encoded): | ||
− | </translate> | ||
* <code><nowiki>{{NAMESPACEE}}</nowiki></code> | * <code><nowiki>{{NAMESPACEE}}</nowiki></code> | ||
* <code><nowiki>{{SUBJECTSPACEE}}</nowiki></code> | * <code><nowiki>{{SUBJECTSPACEE}}</nowiki></code> | ||
+ | * <code><nowiki>{{ARTICLESPACEE}}</nowiki></code> | ||
* <code><nowiki>{{TALKSPACEE}}</nowiki></code> | * <code><nowiki>{{TALKSPACEE}}</nowiki></code> | ||
− | <translate> | + | <translate><!--T:146--> |
− | <!--T:146--> | + | As of {{mediawiki|rev:46630|1.15+}}, these can take a full-page-name parameter and will return the requested namespace associated with that page, instead of with the current page:</translate> |
− | As of {{mediawiki|rev:46630|1.15+}}, these can take a full-page-name parameter and will return the requested namespace associated with that page, instead of with the current page: | ||
− | </translate> | ||
* <code><nowiki>{{NAMESPACE:Template:Main Page}}</nowiki></code> → '''{{NAMESPACE:Template:Main Page}}''' | * <code><nowiki>{{NAMESPACE:Template:Main Page}}</nowiki></code> → '''{{NAMESPACE:Template:Main Page}}''' | ||
* <code><nowiki>{{SUBJECTSPACE:Template:Main Page}}</nowiki></code> → '''{{SUBJECTSPACE:Template:Main Page}}''' | * <code><nowiki>{{SUBJECTSPACE:Template:Main Page}}</nowiki></code> → '''{{SUBJECTSPACE:Template:Main Page}}''' | ||
* <code><nowiki>{{TALKSPACE:Template:Main Page}}</nowiki></code> → '''{{TALKSPACE:Template:Main Page}}''' | * <code><nowiki>{{TALKSPACE:Template:Main Page}}</nowiki></code> → '''{{TALKSPACE:Template:Main Page}}''' | ||
+ | <translate><!--T:147--> | ||
+ | Parameter must not be a namespace name:</translate> | ||
+ | * <code><nowiki>{{SUBJECTSPACE:Help talk}}</nowiki></code> → '''{{SUBJECTSPACE:Help talk}}<!-- empty --> ''' (''Empty'') | ||
+ | |||
<translate> | <translate> | ||
− | <!--T: | + | === Other === <!--T:293--> |
− | |||
</translate> | </translate> | ||
− | + | {| class="wikitable" | |
+ | |- | ||
+ | ! <translate><!--T:294--> | ||
+ | Variable</translate> | ||
+ | ! <translate><!--T:295--> | ||
+ | Output</translate> | ||
+ | ! <translate><!--T:296--> | ||
+ | Description</translate> | ||
+ | ! <translate><!--T:297--> | ||
+ | Versions</translate> | ||
+ | |- | ||
+ | | <code><nowiki>{{!}}</nowiki></code> | ||
+ | |style="text-align:center;"| <nowiki>|</nowiki> | ||
+ | | {{Anchor|PIPE|Pipe|pipe|.7C|.7c}}<translate><!--T:298--> | ||
+ | Used to include a pipe character as part of a template argument or table cell contents. Before this was added as a magic word, many wikis implemented this by creating [[Template:!]] with <code><nowiki>|</nowiki></code> as the content.</translate> | ||
+ | | {{ {{TNTN|MW version}} |version=1.24|compact=y|comment=and after|gerrit change=136234}} | ||
+ | |} | ||
+ | {{anchor|Parser functions}} | ||
<translate> | <translate> | ||
== Parser functions == <!--T:148--> | == Parser functions == <!--T:148--> | ||
<!--T:149--> | <!--T:149--> | ||
− | Parser functions are very similar to variables, but take one or more parameters (technically, any magic word that takes a parameter is a parser function), and the name is sometimes prefixed with a hash to distinguish them from templates. | + | Parser functions are very similar to variables, but take one or more parameters (technically, any magic word that takes a parameter is a parser function), and the name is sometimes prefixed with a [[:en:Number sign|hash]] to distinguish them from templates. |
<!--T:150--> | <!--T:150--> | ||
− | This page only describes parser functions that are integral to the MediaWiki software. Other parser functions may be added by MediaWiki extensions such as the | + | This page only describes parser functions that are integral to the MediaWiki software. Other parser functions may be added by MediaWiki extensions such as the <tvar|ext-pf>{{ll|Extension:ParserFunctions}}</>. For those see <tvar|help-ext-pf>{{ll|Help:Extension:ParserFunctions}}</>. |
=== Technical metadata of another page === <!--T:151--> | === Technical metadata of another page === <!--T:151--> | ||
722行目: | 776行目: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! <translate><!--T:152--> | + | ! width="15%" | <translate><!--T:152--> |
Parser function</translate> | Parser function</translate> | ||
− | ! <translate><!--T:153--> | + | ! width="10%" | <translate><!--T:153--> |
Output<br />(for page [[MediaWiki]])</translate> | Output<br />(for page [[MediaWiki]])</translate> | ||
! <translate><!--T:154--> | ! <translate><!--T:154--> | ||
Description</translate> | Description</translate> | ||
− | ! <translate><!--T:155--> | + | ! width="10%" | <translate><!--T:155--> |
− | Versions</translate> | + | Versions</translate>{{Anchor|PAGEID:}} |
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{PAGEID: </nowiki><translate><!--T:267--> | | <code><nowiki>{{PAGEID: </nowiki><translate><!--T:267--> | ||
''page name''</translate><nowiki> }}</nowiki></code> | ''page name''</translate><nowiki> }}</nowiki></code> | ||
| {{PAGEID: MediaWiki }} | | {{PAGEID: MediaWiki }} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:330--> |
− | + | Expensive</translate>]''' <translate><!--T:156--> | |
− | | {{MW version|version=1.23|compact=y|comment=and after|gerrit change=76534}} | + | Returns the page identifier of the specified page*.</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=76534}}{{Anchor|PAGESIZE:}} | ||
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{PAGESIZE: </nowiki><translate><!--T:268--> | | <code><nowiki>{{PAGESIZE: </nowiki><translate><!--T:268--> | ||
''page name''<tvar|code1><nowiki> }}</nowiki></code> <br /><code><nowiki>{{PAGESIZE: </nowiki></>''page name''</translate><nowiki> |R}}</nowiki> | ''page name''<tvar|code1><nowiki> }}</nowiki></code> <br /><code><nowiki>{{PAGESIZE: </nowiki></>''page name''</translate><nowiki> |R}}</nowiki> | ||
| {{PAGESIZE: MediaWiki }} <br />{{PAGESIZE: MediaWiki |R}} | | {{PAGESIZE: MediaWiki }} <br />{{PAGESIZE: MediaWiki |R}} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:331--> |
− | + | Expensive</translate>]''' <translate><!--T:157--> | |
− | | {{Anchor|PAGESIZE}}{{MW version|version=1.13|compact=y|comment=and after|r=33551}} | + | Returns the byte size of the specified page. Use "<tvar|r><code><nowiki>|R</nowiki></code></>" to get raw (unformatted) numbers.</translate> |
+ | | {{Anchor|PAGESIZE}}{{ {{TNTN|MW version}} |version=1.13|compact=y|comment=and after|r=33551}}{{Anchor|PROTECTIONLEVEL:}} | ||
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{</nowiki>PROTECTIONLEVEL:<translate><!--T:269--> | | <code><nowiki>{{</nowiki>PROTECTIONLEVEL:<translate><!--T:269--> | ||
749行目: | 805行目: | ||
''page name''</translate>}}</code> | ''page name''</translate>}}</code> | ||
| {{PROTECTIONLEVEL: edit | MediaWiki }} | | {{PROTECTIONLEVEL: edit | MediaWiki }} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:332--> |
− | + | Expensive</translate>]''' <translate><!--T:158--> | |
− | | {{MW version|version=1.21|compact=y|comment=and after|r=44683}} | + | Outputs the protection level (e.g. "autoconfirmed", "sysop") for a given action (e.g. "edit", "move") on the specified page. Returns an empty string if not protected.</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.21|compact=y|comment=and after|r=44683}}{{Anchor|PROTECTIONEXPIRY:}} | ||
+ | |- style="background: #FED;" | ||
+ | | <code><nowiki>{{</nowiki>PROTECTIONEXPIRY: | ||
+ | ''action'' | | ||
+ | ''page name''}}</code> | ||
+ | | {{PROTECTIONLEVEL: edit | MediaWiki }} | ||
+ | | '''[Expensive]''' Outputs the protection expiry (e.g. "20160418155030", "infinity") for a given action (e.g. "edit", "move") on the specified page. Returns "infinity" if not protected. | ||
+ | | {{ {{TNTN|MW version}} |version=1.27|compact=y|comment=and after|gerrit change=255717}}{{Anchor|CASCADINGSOURCES:}} | ||
+ | |- style="background: #FED;" | ||
+ | | <code><nowiki>{{CASCADINGSOURCES:</nowiki> ''page name''<nowiki>}}</nowiki></code> | ||
+ | | <!-- Leave this empty. --> | ||
+ | | '''[<translate><!--T:333--> | ||
+ | Expensive</translate>]''' <translate><!--T:292--> | ||
+ | Returns the sources of any cascading protection acting on the specified page. Pages will not return their own title unless they transclude themselves.</translate> | ||
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=104999}}{{Anchor|REVISIONID:}} | ||
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{REVISIONID: </nowiki><translate><!--T:271--> | | <code><nowiki>{{REVISIONID: </nowiki><translate><!--T:271--> | ||
''page name''</translate><nowiki> }}</nowiki></code> | ''page name''</translate><nowiki> }}</nowiki></code> | ||
| {{REVISIONID: MediaWiki }} | | {{REVISIONID: MediaWiki }} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:334--> |
− | + | Expensive</translate>]''' <translate><!--T:160--> | |
− | | {{MW version|version=1.23|compact=y|comment=and after|gerrit change=76534}} | + | Unique revision ID of the last revision on the specified page*.</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=76534}}{{Anchor|REVISIONDAY:}} | ||
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{REVISIONDAY: </nowiki><translate><!--T:272--> | | <code><nowiki>{{REVISIONDAY: </nowiki><translate><!--T:272--> | ||
''page name''</translate><nowiki> }}</nowiki></code> | ''page name''</translate><nowiki> }}</nowiki></code> | ||
| {{REVISIONDAY: MediaWiki }} | | {{REVISIONDAY: MediaWiki }} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:335--> |
− | + | Expensive</translate>]''' <translate><!--T:161--> | |
− | | {{MW version|version=1.23|compact=y|comment=and after|gerrit change=76534}} | + | Day of edit from the last revision of the specified page* (unpadded number).</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=76534}}{{Anchor|REVISIONDAY2:}} | ||
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{REVISIONDAY2: </nowiki><translate><!--T:273--> | | <code><nowiki>{{REVISIONDAY2: </nowiki><translate><!--T:273--> | ||
''page name''</translate><nowiki> }}</nowiki></code> | ''page name''</translate><nowiki> }}</nowiki></code> | ||
| {{REVISIONDAY2: MediaWiki }} | | {{REVISIONDAY2: MediaWiki }} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:336--> |
− | + | Expensive</translate>]''' <translate><!--T:162--> | |
− | | {{MW version|version=1.23|compact=y|comment=and after|gerrit change=76534}} | + | Day of edit from the last revision of the specified page* (zero-padded number).</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=76534}}{{Anchor|REVISIONMONTH:}} | ||
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{REVISIONMONTH: </nowiki><translate><!--T:274--> | | <code><nowiki>{{REVISIONMONTH: </nowiki><translate><!--T:274--> | ||
''page name''</translate><nowiki> }}</nowiki></code> | ''page name''</translate><nowiki> }}</nowiki></code> | ||
| {{REVISIONMONTH: MediaWiki }} | | {{REVISIONMONTH: MediaWiki }} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:337--> |
− | + | Expensive</translate>]''' <translate><!--T:163--> | |
− | | {{MW version|version=1.23|compact=y|comment=and after|gerrit change=76534}} | + | Month of edit from the last revision of the specified page* (zero-padded number as of {{mediawiki|rev:66200|1.17+}}, unpadded number in prior versions).</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=76534}}{{Anchor|REVISIONMONTH1:}} | ||
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{REVISIONMONTH1: </nowiki><translate><!--T:275--> | | <code><nowiki>{{REVISIONMONTH1: </nowiki><translate><!--T:275--> | ||
''page name''</translate><nowiki> }}</nowiki></code> | ''page name''</translate><nowiki> }}</nowiki></code> | ||
| {{REVISIONMONTH1: MediaWiki }} | | {{REVISIONMONTH1: MediaWiki }} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:338--> |
− | + | Expensive</translate>]''' <translate><!--T:164--> | |
− | | {{MW version|version=1.23|compact=y|comment=and after|gerrit change=76534}} | + | Month of edit from the last revision of the specified page* (unpadded number).</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=76534}}{{Anchor|REVISIONYEAR:}} | ||
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{REVISIONYEAR: </nowiki><translate><!--T:276--> | | <code><nowiki>{{REVISIONYEAR: </nowiki><translate><!--T:276--> | ||
''page name''</translate><nowiki> }}</nowiki></code> | ''page name''</translate><nowiki> }}</nowiki></code> | ||
| {{REVISIONYEAR: MediaWiki }} | | {{REVISIONYEAR: MediaWiki }} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:339--> |
− | + | Expensive</translate>]''' <translate><!--T:165--> | |
− | | {{MW version|version=1.23|compact=y|comment=and after|gerrit change=76534}} | + | Year of edit from the last revision of the specified page*.</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=76534}}{{Anchor|REVISIONTIMESTAMP:}} | ||
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{REVISIONTIMESTAMP: </nowiki><translate><!--T:277--> | | <code><nowiki>{{REVISIONTIMESTAMP: </nowiki><translate><!--T:277--> | ||
''page name''</translate><nowiki> }}</nowiki></code> | ''page name''</translate><nowiki> }}</nowiki></code> | ||
| {{REVISIONTIMESTAMP: MediaWiki }} | | {{REVISIONTIMESTAMP: MediaWiki }} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:340--> |
− | + | Expensive</translate>]''' <translate><!--T:166--> | |
− | | {{MW version|version=1.23|compact=y|comment=and after|gerrit change=76534}} | + | Timestamp as of time of edit on the specified page*.</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=76534}}{{Anchor|REVISIONUSER:}} | ||
|- style="background: #FED;" | |- style="background: #FED;" | ||
| <code><nowiki>{{REVISIONUSER: </nowiki><translate><!--T:278--> | | <code><nowiki>{{REVISIONUSER: </nowiki><translate><!--T:278--> | ||
''page name''</translate><nowiki> }}</nowiki></code> | ''page name''</translate><nowiki> }}</nowiki></code> | ||
| {{REVISIONUSER: MediaWiki }} | | {{REVISIONUSER: MediaWiki }} | ||
− | | <translate><!--T: | + | | '''[<translate><!--T:341--> |
− | + | Expensive</translate>]''' <translate><!--T:167--> | |
− | | {{MW version|version=1.23|compact=y|comment=and after|gerrit change=76534}} | + | The username from the last revision on the specified page*.</translate> |
+ | | {{ {{TNTN|MW version}} |version=1.23|compact=y|comment=and after|gerrit change=76534}} | ||
|- | |- | ||
| colspan="4" | <translate><!--T:168--> | | colspan="4" | <translate><!--T:168--> | ||
832行目: | 911行目: | ||
|- | |- | ||
| <code><nowiki>{{localurl:</nowiki><translate><!--T:279--> | | <code><nowiki>{{localurl:</nowiki><translate><!--T:279--> | ||
− | ''page name''<tvar|code1><nowiki>}}</nowiki></code> <br /><code><nowiki>{{localurl:</nowiki></>''page name''<tvar|code2><nowiki>|</nowiki></>''query_string''</translate><nowiki>}}</nowiki></code> | + | ''page name''<tvar|code1><nowiki>}}</nowiki></code> <br /><code><nowiki>{{localurl:</nowiki></>''page name''<br /><tvar|code2><nowiki>|</nowiki></>''query_string''</translate><nowiki>}}</nowiki></code> |
− | | <code><nowiki>{{localurl:MediaWiki}}</nowiki></code> → {{localurl:MediaWiki}} <br /><code><nowiki>{{localurl:MediaWiki|printable=yes}}</nowiki></code> | + | | <code><nowiki>{{localurl:MediaWiki}}</nowiki></code><br />→ {{localurl:MediaWiki}} <br /><code><nowiki>{{localurl:MediaWiki|printable=yes}}</nowiki></code><br />→ {{localurl:MediaWiki|printable=yes}} |
| <translate><!--T:174--> | | <translate><!--T:174--> | ||
The relative path to the title. </translate> | The relative path to the title. </translate> | ||
841行目: | 920行目: | ||
|- | |- | ||
| <code><nowiki>{{fullurl:</nowiki><translate><!--T:280--> | | <code><nowiki>{{fullurl:</nowiki><translate><!--T:280--> | ||
− | ''page name''<tvar|code1><nowiki>}}</nowiki></code> <br /><code><nowiki>{{fullurl:</nowiki></>''page name''<tvar|code2><nowiki>|</nowiki></>''query_string''<tvar|code3><nowiki>}}</nowiki></code> <br /><code><nowiki>{{fullurl:</nowiki></>''interwiki:remote page name''<tvar|code4><nowiki>|</nowiki></>''query_string''</translate><nowiki>}}</nowiki></code> | + | ''page name''<tvar|code1><nowiki>}}</nowiki></code> <br /><code><nowiki>{{fullurl:</nowiki></>''page name''<tvar|code2><br /><nowiki>|</nowiki></>''query_string''<tvar|code3><nowiki>}}</nowiki></code> <br /><code><nowiki>{{fullurl:</nowiki></>''interwiki:remote page name''<tvar|code4><br /><nowiki>|</nowiki></>''query_string''</translate><nowiki>}}</nowiki></code> |
− | | <code><nowiki>{{fullurl:Category:Top level}}</nowiki></code> → {{fullurl:Category:Top level}} <br /> | + | | <code><nowiki>{{fullurl:Category:Top level}}</nowiki></code><br />→ {{fullurl:Category:Top level}} <br /> |
− | <code><nowiki>{{fullurl:Category:Top level|action=edit}}</nowiki></code> → {{fullurl:Category:Top level|action=edit}} | + | <code><nowiki>{{fullurl:Category:Top level|action=edit}}</nowiki></code><br />→ {{fullurl:Category:Top level|action=edit}}<br /> |
+ | <code><nowiki>https:{{fullurl:s:Electra|action=edit}}</nowiki></code><br />→ https:{{fullurl:s:Electra|action=edit}}<br /> | ||
+ | <code><nowiki>https:{{fullurl:s:es:Electra|action=edit}}</nowiki></code><br />→ https:{{fullurl:s:es:Electra|action=edit}} | ||
| <translate><!--T:175--> | | <translate><!--T:175--> | ||
A protocol-relative path to the title. This will also resolve [[<tvar|manual-interwiki>Special:MyLanguage/Manual:Interwiki</>|interwiki]] prefixes. '''Note:''' Unbracketed (plain) protocol-relative links are not automagically linked.</translate> | A protocol-relative path to the title. This will also resolve [[<tvar|manual-interwiki>Special:MyLanguage/Manual:Interwiki</>|interwiki]] prefixes. '''Note:''' Unbracketed (plain) protocol-relative links are not automagically linked.</translate> | ||
− | | {{MW version|version=1.5|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.5|compact=y|comment=and after}} |
|- | |- | ||
| colspan="4"| {{Anchor|canonicalurl|CANONICALURL}} | | colspan="4"| {{Anchor|canonicalurl|CANONICALURL}} | ||
|- | |- | ||
| <code><nowiki>{{canonicalurl:</nowiki><translate><!--T:281--> | | <code><nowiki>{{canonicalurl:</nowiki><translate><!--T:281--> | ||
− | ''page name''<tvar|code1><nowiki>}}</nowiki></code> <br /><code><nowiki>{{canonicalurl:</nowiki></>''page name''<tvar|code2><nowiki>|</nowiki></>''query_string''<tvar|code3><nowiki>}}</nowiki></code> <br /><code><nowiki>{{canonicalurl:</nowiki></>''interwiki:remote page name''<tvar|code4><nowiki>|</nowiki></>''query_string''</translate><nowiki>}}</nowiki></code> | + | ''page name''<tvar|code1><nowiki>}}</nowiki></code> <br /><code><nowiki>{{canonicalurl:</nowiki></>''page name''<tvar|code2><br /><nowiki>|</nowiki></>''query_string''<tvar|code3><nowiki>}}</nowiki></code> <br /><code><nowiki>{{canonicalurl:</nowiki></>''interwiki:remote page name''<tvar|code4><br /><nowiki>|</nowiki></>''query_string''</translate><nowiki>}}</nowiki></code> |
− | | <code><nowiki>{{canonicalurl:Category:Top level}}</nowiki></code> → {{canonicalurl:Category:Top level}} <br /> | + | | <code><nowiki>{{canonicalurl:Category:Top level}}</nowiki></code><br />→ {{canonicalurl:Category:Top level}} <br /> |
− | <code><nowiki>{{canonicalurl:Category:Top level|action=edit}}</nowiki></code> → {{canonicalurl:Category:Top level|action=edit}} | + | <code><nowiki>{{canonicalurl:Category:Top level|action=edit}}</nowiki></code><br />→ {{canonicalurl:Category:Top level|action=edit}} |
| <translate><!--T:176--> | | <translate><!--T:176--> | ||
The absolute path to the title, using the canonical URL. This will also resolve [[<tvar|manual-interwiki>Special:MyLanguage/Manual:Interwiki</>|interwiki]] prefixes.</translate> | The absolute path to the title, using the canonical URL. This will also resolve [[<tvar|manual-interwiki>Special:MyLanguage/Manual:Interwiki</>|interwiki]] prefixes.</translate> | ||
− | | {{MW version|version=1.18|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.18|compact=y|comment=and after}} |
|- | |- | ||
| colspan="4"| {{Anchor|filepath|FILEPATH}} | | colspan="4"| {{Anchor|filepath|FILEPATH}} | ||
862行目: | 943行目: | ||
| <code><nowiki>{{filepath:</nowiki><translate><!--T:282--> | | <code><nowiki>{{filepath:</nowiki><translate><!--T:282--> | ||
''file name''<tvar|code1><nowiki>}}</nowiki></code> <br /><code><nowiki>{{filepath:</nowiki></>''file name''<tvar|code2><nowiki>|nowiki}}</nowiki></code> <br /><code><nowiki>{{filepath:</nowiki></>''file name''<tvar|code3><nowiki>|</nowiki></>''thumbnail_size''</translate><nowiki>}}</nowiki></code> | ''file name''<tvar|code1><nowiki>}}</nowiki></code> <br /><code><nowiki>{{filepath:</nowiki></>''file name''<tvar|code2><nowiki>|nowiki}}</nowiki></code> <br /><code><nowiki>{{filepath:</nowiki></>''file name''<tvar|code3><nowiki>|</nowiki></>''thumbnail_size''</translate><nowiki>}}</nowiki></code> | ||
− | | <code><nowiki>{{filepath:Wiki.png}}</nowiki></code> → {{filepath:Wiki.png}} <br /> | + | | <code><nowiki>{{filepath:Wiki.png}}</nowiki></code><br />→ {{filepath:Wiki.png}} <br /> |
− | <code><nowiki>{{filepath:Wiki.png|nowiki}}</nowiki></code> → {{filepath:Wiki.png|nowiki}} <br /> | + | <code><nowiki>{{filepath:Wiki.png|nowiki}}</nowiki></code><br />→ {{filepath:Wiki.png|nowiki}} <br /> |
− | <code><nowiki>{{filepath:Example.svg|300}}</nowiki></code> → {{filepath:Example.svg|300}} <br /> | + | <code><nowiki>{{filepath:Example.svg|300}}</nowiki></code><br />→ {{filepath:Example.svg|300}} <br /> |
| <translate><!--T:177--> | | <translate><!--T:177--> | ||
A protocol-relative path to the full size or thumbnail ({{mediawiki|rev:80813|1.18+}}) of a media file.</translate> | A protocol-relative path to the full size or thumbnail ({{mediawiki|rev:80813|1.18+}}) of a media file.</translate> | ||
− | | {{MW version|version=1.12|compact=y|comment=and after|r=25854}} <br />{{MW version|version=1.18|compact=y|comment=and after|r=80813}} | + | | {{ {{TNTN|MW version}} |version=1.12|compact=y|comment=and after|r=25854}} <br />{{ {{TNTN|MW version}} |version=1.18|compact=y|comment=and after|r=80813}} |
|- | |- | ||
| colspan="4"| {{Anchor|urlencode|URLENCODE}} | | colspan="4"| {{Anchor|urlencode|URLENCODE}} | ||
|- | |- | ||
| <code><nowiki>{{urlencode:</nowiki><translate><!--T:283--> | | <code><nowiki>{{urlencode:</nowiki><translate><!--T:283--> | ||
− | ''string''<tvar|code1><nowiki>}}</nowiki></code></> | + | ''string''<tvar|code1><nowiki>}}</nowiki></code></> or <br /><tvar|code2><code><nowiki>{{urlencode:</nowiki></>''string''<tvar|code3><nowiki>|QUERY}}</nowiki></code></> <tvar|code4><br /><code><nowiki>{{urlencode:</nowiki></>''string''<tvar|code5><nowiki>|WIKI}}</nowiki></code> <br /><code><nowiki>{{urlencode:</nowiki></>''string''</translate><nowiki>|PATH}}</nowiki></code> |
− | | <code><nowiki>{{urlencode:x:y/z á é}}</nowiki></code> | + | | <code><nowiki>{{urlencode:x:y/z á é}}</nowiki></code> or <br /><code><nowiki>{{urlencode:x:y/z á é|QUERY}}</nowiki></code><br />→ {{urlencode:x:y/z á é}} <br /><code><nowiki>{{urlencode:x:y/z á é|WIKI}}</nowiki></code><br />→ {{urlencode:x:y/z á é|WIKI}} <br /><code><nowiki>{{urlencode:x:y/z á é|PATH}}</nowiki></code><br />→ {{urlencode:x:y/z á é|PATH}} |
<translate><!--T:178--> | <translate><!--T:178--> | ||
Note that the default changed from <tvar|wiki><code>|WIKI</code></> to <tvar|query><code>|QUERY</code></> in 1.17; this may break templates that rely on this function.</translate> | Note that the default changed from <tvar|wiki><code>|WIKI</code></> to <tvar|query><code>|QUERY</code></> in 1.17; this may break templates that rely on this function.</translate> | ||
| <translate><!--T:179--> | | <translate><!--T:179--> | ||
− | The input encoded for use in URLs. Note that there is no urldecode function like there is in the obsolete | + | The input encoded for use in URLs. Note that there is no urldecode function like there is in the obsolete <tvar|ext-stringfunctions>{{ll|Extension:StringFunctions}}</></translate>.<br /><table class="wikitable"><caption><translate><!--T:305--> |
− | | {{MW version|version=1.7|compact=y|comment=and after|r=14273}} (or {{MW version|version=1.17|compact=y|comment=and after|r=64726}} <br />{{MW version|version=1.17|compact=y|comment=and after|r=64726}} <br />{{MW version|version=1.17|compact=y|comment=and after|r=64726}}) | + | Encoding</translate></caption><tr><th><translate><!--T:306--> |
+ | code</translate></th><th><translate><!--T:307--> | ||
+ | space</translate></th></tr><tr><td> ''none''</td><td><samp> + </samp></td></tr><tr><td><kbd>QUERY</kbd></td><td><samp> + </samp></td></tr><tr><td><kbd> WIKI</kbd></td><td><samp> _ </samp></td></tr><tr><td><kbd> PATH</kbd></td><td><samp>%20</samp></td></tr></table> | ||
+ | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after|r=14273}} (or {{ {{TNTN|MW version}} |version=1.17|compact=y|comment=and after|r=64726}} <br />{{ {{TNTN|MW version}} |version=1.17|compact=y|comment=and after|r=64726}} <br />{{ {{TNTN|MW version}} |version=1.17|compact=y|comment=and after|r=64726}}) | ||
|- | |- | ||
| colspan="4"| {{Anchor|anchorencode|ANCHORENCODE}} | | colspan="4"| {{Anchor|anchorencode|ANCHORENCODE}} | ||
884行目: | 968行目: | ||
| <code><nowiki>{{anchorencode:</nowiki><translate><!--T:284--> | | <code><nowiki>{{anchorencode:</nowiki><translate><!--T:284--> | ||
''string''</translate><nowiki>}}</nowiki></code> | ''string''</translate><nowiki>}}</nowiki></code> | ||
− | | <code><nowiki>{{anchorencode:x y z á é}}</nowiki></code> → {{anchorencode:x y z á é}} | + | | <code><nowiki>{{anchorencode:x y z á é}}</nowiki></code><br />→ {{anchorencode:x y z á é}} |
| <translate><!--T:180--> | | <translate><!--T:180--> | ||
The input encoded for use in URL section anchors (after the “#” symbol in a URL).</translate> | The input encoded for use in URL section anchors (after the “#” symbol in a URL).</translate> | ||
− | | {{MW version|version=1.6|compact=y|comment=and after|r=16279}} | + | | {{ {{TNTN|MW version}} |version=1.6|compact=y|comment=and after|r=16279}} |
|} | |} | ||
+ | {{anchor|Namespaces_2}} | ||
<translate> | <translate> | ||
− | |||
=== Namespaces === <!--T:181--> | === Namespaces === <!--T:181--> | ||
898行目: | 982行目: | ||
<!--T:183--> | <!--T:183--> | ||
− | <tvar|nse><code><nowiki>{{nse:}}</nowiki></code></> is the equivalent encoded for MediaWiki URLs. It does the same, but it replaces spaces with underscores, making it usable in external links. | + | <tvar|nse><code><nowiki>{{nse:}}</nowiki></code></> is the equivalent encoded for MediaWiki URLs. It does the same, but it replaces spaces with underscores, making it usable in external links.</translate> |
− | </translate> | ||
{| class="wikitable" | {| class="wikitable" | ||
905行目: | 988行目: | ||
! colspan="2" width="50%" | <translate><!--T:258--> | ! colspan="2" width="50%" | <translate><!--T:258--> | ||
Content namespaces</translate> | Content namespaces</translate> | ||
− | ! rowspan=" | + | ! rowspan="11" | |
! colspan="2" width=%50%" | <translate><!--T:259--> | ! colspan="2" width=%50%" | <translate><!--T:259--> | ||
Talk namespaces</translate> | Talk namespaces</translate> | ||
919行目: | 1,002行目: | ||
|- | |- | ||
| <code><nowiki>{{ns:-2}}</nowiki></code> / <code><nowiki>{{ns:Media}}</nowiki></code> | | <code><nowiki>{{ns:-2}}</nowiki></code> / <code><nowiki>{{ns:Media}}</nowiki></code> | ||
− | | {{ns:-2}} | + | | {{ns:-2}} |
− | |||
| <code><nowiki>{{ns:-1}}</nowiki></code> / <code><nowiki>{{ns:Special}}</nowiki></code> | | <code><nowiki>{{ns:-1}}</nowiki></code> / <code><nowiki>{{ns:Special}}</nowiki></code> | ||
− | | {{ns:-1}} | + | | {{ns:-1}}<br/>''(no '''talk''' page)'' |
|- | |- | ||
| <code><nowiki>{{ns:0}}</nowiki></code> / <code><nowiki>{{ns:}}</nowiki></code> | | <code><nowiki>{{ns:0}}</nowiki></code> / <code><nowiki>{{ns:}}</nowiki></code> | ||
− | | {{ns:}} | + | | {{ns:0}} |
| <code><nowiki>{{ns:1}}</nowiki></code> / <code><nowiki>{{ns:Talk}}</nowiki></code> | | <code><nowiki>{{ns:1}}</nowiki></code> / <code><nowiki>{{ns:Talk}}</nowiki></code> | ||
| {{ns:1}} | | {{ns:1}} | ||
965行目: | 1,047行目: | ||
|} | |} | ||
+ | <translate><!--T:188--> | ||
+ | Don't confuse localised namespaces with [[<tvar|manual-custom-ns>Special:MyLanguage/Manual:Using custom namespaces</>|custom namespaces]].</translate> | ||
+ | |||
+ | {{anchor|Formatting}} | ||
<translate> | <translate> | ||
− | |||
− | |||
− | |||
=== Formatting === <!--T:189--> | === Formatting === <!--T:189--> | ||
</translate> | </translate> | ||
− | |||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | ! <translate><!--T:190--> | + | ! width="10%" | <translate><!--T:190--> |
Usage</translate> | Usage</translate> | ||
− | ! <translate><!--T:191--> | + | ! width="40%" | <translate><!--T:191--> |
Input → Output</translate> | Input → Output</translate> | ||
! <translate><!--T:192--> | ! <translate><!--T:192--> | ||
Description</translate> | Description</translate> | ||
− | ! <translate><!--T:193--> | + | ! width="10%" | <translate><!--T:193--> |
Version</translate> | Version</translate> | ||
|- | |- | ||
− | | <code><nowiki>{{formatnum:</nowiki>'' | + | | <code><nowiki>{{formatnum:</nowiki>''unformatted number''<nowiki>}}</nowiki></code> <br /> |
<code><nowiki>{{formatnum:</nowiki>''formatnum-formatted number''<nowiki>|R}}</nowiki></code> <br /> | <code><nowiki>{{formatnum:</nowiki>''formatnum-formatted number''<nowiki>|R}}</nowiki></code> <br /> | ||
− | <code><nowiki>{{formatnum:</nowiki>'' | + | <code><nowiki>{{formatnum:</nowiki>''unformatted number''<nowiki>|NOSEP}}</nowiki></code> |
| | | | ||
* <translate><!--T:194--> | * <translate><!--T:194--> | ||
Simple:</translate> | Simple:</translate> | ||
− | ** <code><nowiki>{{formatnum:987654321.654321}}</nowiki></code> <br/> → {{formatnum:987654321.654321}} | + | ** <code><nowiki>{{formatnum:987654321.654321}}</nowiki></code> <br/> → {{formatnum:987654321.654321}} |
− | ** <code><nowiki>{{formatnum: | + | ** <code><nowiki>{{formatnum:</nowiki>{{formatnum:987654321.654321}}<nowiki>|R}}</nowiki></code> <br/> → {{formatnum:{{formatnum:987654321.654321}}|R}} |
* <translate><!--T:195--> | * <translate><!--T:195--> | ||
Advanced:</translate> | Advanced:</translate> | ||
− | ** <code><nowiki>{{formatnum:{{formatnum:987654321.654321}}|R}}</nowiki></code> <br/> → 987654321.654321 <translate><!--T:196--> | + | ** <code><nowiki>{{formatnum:{{formatnum:987654321.654321}}|R}}</nowiki></code> <br/> → {{formatnum:{{formatnum:987654321.654321}}|R}} <translate><!--T:196--> |
− | (on any locale)</translate | + | (on any locale)</translate> |
− | ** <code><nowiki>{{formatnum:00001}}</nowiki></code> <br/> → {{formatnum:00001}} <br /> | + | ** <code><nowiki>{{formatnum:00001}}</nowiki></code> <br/> → {{formatnum:00001}} |
+ | ** <code><nowiki>{{formatnum:987654321.654321 |NOSEP}}</nowiki></code> <br/> → {{formatnum:987654321.654321 |NOSEP}} | ||
** <translate><!--T:197--> | ** <translate><!--T:197--> | ||
− | Examples with {{#language: | + | Examples with [[w:Bengali numerals|{{#language:bn|en}} locale]]:</translate> |
− | *** <code><nowiki>{{formatnum:987654321.654321}}</nowiki></code> <br/> → | + | *** <code><nowiki>{{formatnum:987654321.654321}}</nowiki></code> <br/> → ৯৮,৭৬,৫৪,৩২১.৬৫৪৩২১ |
− | *** <code><nowiki>{{formatnum:987654321.654321 |NOSEP}}</nowiki></code> <br/> → | + | *** <code><nowiki>{{formatnum:987654321.654321 |NOSEP}}</nowiki></code> <br/> → ৯৮৭৬৫৪৩২১.৬৫৪৩২১ |
− | *** <code><nowiki>{{formatnum: | + | *** <code><nowiki>{{formatnum:৯৮,৭৬,৫৪,৩২১.৬৫৪৩২১ |R}}</nowiki></code> <br/> → 987654321.654321 |
− | |||
---- | ---- | ||
<translate><!--T:198--> | <translate><!--T:198--> | ||
1,018行目: | 1,099行目: | ||
| <translate><!--T:202--> | | <translate><!--T:202--> | ||
Takes an unformatted number (arab, no group separators and <code>.</code> as decimal separator) and outputs it in the localized digit script and formatted with decimal and decimal group separators, according to the wiki's default locale. <br /> | Takes an unformatted number (arab, no group separators and <code>.</code> as decimal separator) and outputs it in the localized digit script and formatted with decimal and decimal group separators, according to the wiki's default locale. <br /> | ||
− | The <code><nowiki>|</nowiki> | + | The <code><nowiki>|R</nowiki></code> parameter can be used to reverse the behavior, for use in mathematical situations: it's reliable and should be used only to deformat numbers which are known to be formatted exactly as formatnum formats them with the wiki's locale.</translate><br/> |
− | <small>{{TNT|warning}} | + | <translate><!--T:205--> |
− | Leading zeroes are not removed, you can use <nowiki>{{#expr:00001}}</nowiki> instead if you have | + | The <code>NOSEP</code> ("no separators") parameter means that no group / decimal separators are changed; formatnum will only transform the digits themselves in languages which don't use the [[w:en:Hindu–Arabic numeral system|Hindu–Arabic numeral system]]. <code>NOSEP</code> can also prevent non-standard digit groupings you wouldn't expect.</translate> |
+ | |||
+ | <small>{{TNT|warning}} <translate><!--T:203--> | ||
+ | Leading zeroes are not removed, you can use <nowiki>{{#expr:00001}}</nowiki> instead if you have <tvar|ext-pf>{{ll|Extension:ParserFunctions}}</> installed.</translate></small> <br/> | ||
− | <small>{{TNT|warning}} | + | <small>{{TNT|warning}} <translate><!--T:204--> |
If you don't input numbers in the exact format required, don't expect any reliable output, especially on non-English wikis.</translate></small><br/> | If you don't input numbers in the exact format required, don't expect any reliable output, especially on non-English wikis.</translate></small><br/> | ||
− | |||
− | |||
− | |||
− | |||
---- | ---- | ||
− | <translate> | + | <translate><!--T:206--> |
− | <!--T:206--> | + | If you really need to format (according the wiki's locale) a number in unknown input format, you could try and use <code>formatnum</code> two times (but not if it can have a decimal group, or its separator will be eaten or the number won't be formatted). Be aware that this is more a hack than a regular way to proceed, thus the output may be not reliable.</translate> |
− | If you really need to format (according the wiki's locale) a number in unknown input format, you could try and use <code>formatnum</code> two times (but not if it can have a decimal group, or its separator will be eaten or the number won't be formatted). | ||
− | </translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} <br />{{MW version|version=1.13|compact=y|comment=and after|r=32012}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} <br />{{ {{TNTN|MW version}} |version=1.13|compact=y|comment=and after|r=32012}} |
|- | |- | ||
| | | | ||
− | <code><nowiki>{{#dateformat:</nowiki>''date''<nowiki>}}</nowiki><br /> | + | <code><nowiki>{{#dateformat:</nowiki>''date''<nowiki>}}</nowiki></code><br /> |
− | <code><nowiki>{{#formatdate:</nowiki>''date''<nowiki>}}</nowiki><br /> | + | <code><nowiki>{{#formatdate:</nowiki>''date''<nowiki>}}</nowiki></code><br /> |
− | <code><nowiki>{{#dateformat:</nowiki>''date''{{!}}''format''<nowiki>}}</nowiki><br /> | + | <code><nowiki>{{#dateformat:</nowiki>''date''{{!}}''format''<nowiki>}}</nowiki></code><br /> |
<code><nowiki>{{#formatdate:</nowiki>''date''{{!}}''format''<nowiki>}}</nowiki></code> | <code><nowiki>{{#formatdate:</nowiki>''date''{{!}}''format''<nowiki>}}</nowiki></code> | ||
| | | | ||
− | <code><nowiki>{{#dateformat:25 | + | <code><nowiki>{{#dateformat:25 dec 2009|ymd}}</nowiki></code> <br/> |
− | → {{#dateformat:25 | + | → {{#dateformat:25 dec 2009|ymd}} <translate><!--T:207--> |
− | (your pref), 2009 | + | (your pref), 2009 Dec 25 (default)</translate> <br/> |
<code><nowiki>{{#formatdate:dec 25,2009|dmy}}</nowiki></code> <br/> | <code><nowiki>{{#formatdate:dec 25,2009|dmy}}</nowiki></code> <br/> | ||
→ {{#formatdate:dec 25,2009|dmy}} <translate><!--T:208--> | → {{#formatdate:dec 25,2009|dmy}} <translate><!--T:208--> | ||
1,058行目: | 1,136行目: | ||
→ {{#dateformat:25 decEmber|mdy}} <translate><!--T:211--> | → {{#dateformat:25 decEmber|mdy}} <translate><!--T:211--> | ||
(your pref), DecEmber 25 (default)</translate> <br/> | (your pref), DecEmber 25 (default)</translate> <br/> | ||
− | <translate> | + | <translate><!--T:212--> |
− | <!--T:212--> | ||
''Note:'' In the example hereinbefore, "your pref" refers to your date preference on the current MediaWiki wiki only. | ''Note:'' In the example hereinbefore, "your pref" refers to your date preference on the current MediaWiki wiki only. | ||
</translate> | </translate> | ||
| <translate><!--T:213--> | | <translate><!--T:213--> | ||
− | Formats an unlinked date based on user "date format" preference, and adds metadata tagging it as a formatted date. For logged-out users and those who have not set a date format in their preferences, dates can be given a default: <code>mdy</code>, <code>dmy</code>, <code>ymd</code>, <code>ISO 8601</code> (all case sensitive). If only the month and day are given, only <code>mdy</code> and <code>dmy</code> are valid. If a format is not specified or is invalid, the input format is used as a default. If the supplied date is not recognized as a valid date (specifically, if it contains any metadata such as from a nested use of these or similar templates), it is rendered unchanged, and no (additional) metadata is generated. </translate><br/ | + | Formats an unlinked date based on user "date format" preference, and adds metadata tagging it as a formatted date. For logged-out users and those who have not set a date format in their preferences, dates can be given a default: <code>mdy</code>, <code>dmy</code>, <code>ymd</code>, <code>ISO 8601</code> (all case sensitive). If only the month and day are given, only <code>mdy</code> and <code>dmy</code> are valid. If a format is not specified or is invalid, the input format is used as a default. If the supplied date is not recognized as a valid date (specifically, if it contains any metadata such as from a nested use of these or similar templates), it is rendered unchanged, and no (additional) metadata is generated.</translate> <br/> |
− | {{TNT|warning}}<translate><!--T:214--> | + | <small>{{TNT|warning}}<translate><!--T:214--> |
− | Although the | + | Although the ISO 8601 standard requires that dates be in the Gregorian calendar, the ISO parameter in this function will still format dates that fall outside the usual Gregorian range (e.g. dates prior to 1583). Also, the magic word cannot properly convert between negative years (used with ISO 8601) and years BC or years BCE (used in general writing).</translate></small> |
− | | {{MW version|version=1.15|compact=y|comment=and after|r=48249}} | + | | {{ {{TNTN|MW version}} |version=1.15|compact=y|comment=and after|r=48249}} |
|- | |- | ||
| <code><nowiki>{{lc:</nowiki>''string''<nowiki>}}</nowiki></code> | | <code><nowiki>{{lc:</nowiki>''string''<nowiki>}}</nowiki></code> | ||
1,075行目: | 1,152行目: | ||
| {{Anchor|lc|Lc|LC}}<translate><!--T:215--> | | {{Anchor|lc|Lc|LC}}<translate><!--T:215--> | ||
The lowercase input.</translate> | The lowercase input.</translate> | ||
− | | {{MW version|version=1.5|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.5|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{lcfirst:</nowiki>''string''<nowiki>}}</nowiki></code> | | <code><nowiki>{{lcfirst:</nowiki>''string''<nowiki>}}</nowiki></code> | ||
1,081行目: | 1,158行目: | ||
| {{Anchor|lcfirst|Lcfirst|LCFIRST}}<translate><!--T:216--> | | {{Anchor|lcfirst|Lcfirst|LCFIRST}}<translate><!--T:216--> | ||
The input with the <u>very first</u> character lowercase.</translate> | The input with the <u>very first</u> character lowercase.</translate> | ||
− | | {{MW version|version=1.5|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.5|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{uc:</nowiki>''string''<nowiki>}}</nowiki></code> | | <code><nowiki>{{uc:</nowiki>''string''<nowiki>}}</nowiki></code> | ||
1,087行目: | 1,164行目: | ||
| {{Anchor|uc|Uc|UC}}<translate><!--T:217--> | | {{Anchor|uc|Uc|UC}}<translate><!--T:217--> | ||
The uppercase input.</translate> | The uppercase input.</translate> | ||
− | | {{MW version|version=1.5|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.5|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{ucfirst:</nowiki>''string''<nowiki>}}</nowiki></code> | | <code><nowiki>{{ucfirst:</nowiki>''string''<nowiki>}}</nowiki></code> | ||
1,093行目: | 1,170行目: | ||
| {{Anchor|ucfirst|Ucfirst|UCFIRST}}<translate><!--T:218--> | | {{Anchor|ucfirst|Ucfirst|UCFIRST}}<translate><!--T:218--> | ||
The input with the <u>very first</u> character uppercase.</translate> | The input with the <u>very first</u> character uppercase.</translate> | ||
− | | {{MW version|version=1.5|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.5|compact=y|comment=and after}} |
|- | |- | ||
− | | <code><nowiki>{{padleft:xyz|</nowiki>''stringlength''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{padleft:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''char''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{padleft:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''string''<nowiki>}}</nowiki></code> | + | | <code><nowiki>{{padleft:xyz|</nowiki>''stringlength''<nowiki>}}</nowiki></code> <br /> |
− | | <code><nowiki>{{padleft:xyz|5}}</nowiki></code> → {{padleft:xyz|5}} <br /> <code><nowiki>{{padleft:xyz|5|_}}</nowiki></code> → {{padleft:xyz|5|_}} <code><nowiki>{{padleft:xyz|5|abc}}</nowiki></code> → {{padleft:xyz|5|abc}} <code><nowiki>{{padleft:xyz|2}}</nowiki></code> → {{padleft:xyz|2}} <br /> <code><nowiki>{{padleft:|1|xyz}}</nowiki></code> → {{padleft:|1|xyz}} <translate><!--T:219--> | + | <code><nowiki>{{padleft:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''char''<nowiki>}}</nowiki></code> <br /> |
+ | <code><nowiki>{{padleft:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''string''<nowiki>}}</nowiki></code> | ||
+ | | <code><nowiki>{{padleft:xyz|5}}</nowiki></code> → {{padleft:xyz|5}} <br /> | ||
+ | <code><nowiki>{{padleft:xyz|5|_}}</nowiki></code> → {{padleft:xyz|5|_}} <br /> | ||
+ | <code><nowiki>{{padleft:xyz|5|abc}}</nowiki></code> → {{padleft:xyz|5|abc}}<br /> | ||
+ | <code><nowiki>{{padleft:xyz|2}}</nowiki></code> → {{padleft:xyz|2}} <br /> | ||
+ | <code><nowiki>{{padleft:|1|xyz}}</nowiki></code> → {{padleft:|1|xyz}} | ||
+ | <translate><!--T:219--> | ||
(first character of the string)</translate> <br /> | (first character of the string)</translate> <br /> | ||
| <translate><!--T:220--> | | <translate><!--T:220--> | ||
1,102行目: | 1,186行目: | ||
<!--T:221--> | <!--T:221--> | ||
− | Only the first character of the third parameter is used in versions up to 1.12, but by | + | Only the first character of the third parameter is used in versions up to 1.12, but by version 1.15 all the characters are used. |
<!--T:222--> | <!--T:222--> | ||
'''{{mediawiki|bugzilla:16852|Bug}} (fixed in {{mediawiki|rev:45734|r45734}}):''' multibyte characters are interpreted as two characters, which can skew width. These also cannot be used as padding characters.</translate> | '''{{mediawiki|bugzilla:16852|Bug}} (fixed in {{mediawiki|rev:45734|r45734}}):''' multibyte characters are interpreted as two characters, which can skew width. These also cannot be used as padding characters.</translate> | ||
− | | {{MW version|version=1.8|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.8|compact=y|comment=and after}} |
|- | |- | ||
| <code><nowiki>{{padright:xyz|</nowiki>''stringlength''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{padright:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''char''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{padright:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''string''<nowiki>}}</nowiki></code> | | <code><nowiki>{{padright:xyz|</nowiki>''stringlength''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{padright:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''char''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{padright:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''string''<nowiki>}}</nowiki></code> | ||
| <code><nowiki>{{padright:xyz|5}}</nowiki></code> → {{padright:xyz|5}} <br /> | | <code><nowiki>{{padright:xyz|5}}</nowiki></code> → {{padright:xyz|5}} <br /> | ||
− | <code><nowiki>{{padright:xyz|5|_}}</nowiki></code> → {{padright:xyz|5|_}} | + | <code><nowiki>{{padright:xyz|5|_}}</nowiki></code> → {{padright:xyz|5|_}} <br /> |
− | <code><nowiki>{{padright:xyz|5|abc}}</nowiki></code> → {{padright:xyz|5|abc}} | + | <code><nowiki>{{padright:xyz|5|abc}}</nowiki></code> → {{padright:xyz|5|abc}} <br /> |
<code><nowiki>{{padright:xyz|2}}</nowiki></code> → {{padright:xyz|2}} <br /> | <code><nowiki>{{padright:xyz|2}}</nowiki></code> → {{padright:xyz|2}} <br /> | ||
<code><nowiki>{{padright:|1|xyz}}</nowiki></code> → {{padright:|1|xyz}} <br /> | <code><nowiki>{{padright:|1|xyz}}</nowiki></code> → {{padright:|1|xyz}} <br /> | ||
| <translate><!--T:223--> | | <translate><!--T:223--> | ||
Identical to <code>padleft</code>, but adds padding characters to the right side.</translate> | Identical to <code>padleft</code>, but adds padding characters to the right side.</translate> | ||
− | | {{MW version|version=1.8|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.8|compact=y|comment=and after}} |
|} | |} | ||
+ | <translate><!--T:224--> | ||
+ | '''See also:''' <tvar|ext-stringfunctions>{{ll|Extension:StringFunctions}}</>. | ||
+ | </translate> | ||
+ | |||
+ | {{anchor|Localization|Localisation}} | ||
<translate> | <translate> | ||
− | |||
− | |||
=== Localization === <!--T:225--> | === Localization === <!--T:225--> | ||
<!--T:226--> | <!--T:226--> | ||
− | Here are the magic words which are used as main localisation tools. Other magic words will often depend on the wiki's locale and configuration or on the chosen language: see in particular [[#Date and time]], [[#Formatting]], [[#Miscellaneous]]. More magic words are added by the | + | Here are the magic words which are used as main localisation tools. Other magic words will often depend on the wiki's locale and configuration or on the chosen language: see in particular [[<tvar|date>#Date and time</>|#Date and time]], [[<tvar|formatting>#Formatting</>|#Formatting]], [[<tvar|misc>#Miscellaneous</>|#Miscellaneous]]. More magic words are added by the <tvar|ext-translate>{{ll|Extension:Translate}}</>. |
<!--T:227--> | <!--T:227--> | ||
− | The usage of these magic words can be very complex, and the documentation is currently incomplete; there's some more info on [[translatewiki:Special:MyLanguage/FAQ#PLURAL|PLURAL]], [[translatewiki:Special:MyLanguage/Grammar|GRAMMAR]], [[translatewiki:Special:MyLanguage/Gender|GENDER]]. | + | The usage of these magic words can be very complex, and the documentation is currently incomplete; there's some more info on [[translatewiki:Special:MyLanguage/FAQ#PLURAL|PLURAL]], [[translatewiki:Special:MyLanguage/Grammar|GRAMMAR]], [[translatewiki:Special:MyLanguage/Gender|GENDER]].</translate> |
− | </translate> | ||
{| class="wikitable" | {| class="wikitable" | ||
− | ! <translate><!--T:228--> | + | ! width="10%" | <translate><!--T:228--> |
Usage</translate> | Usage</translate> | ||
− | ! <translate><!--T:229--> | + | ! width="40%" | <translate><!--T:229--> |
Input → Output</translate> | Input → Output</translate> | ||
! <translate><!--T:230--> | ! <translate><!--T:230--> | ||
Description</translate> | Description</translate> | ||
− | ! <translate><!--T:231--> | + | ! width="10%" | <translate><!--T:231--> |
Version</translate> | Version</translate> | ||
|- | |- | ||
| {{Anchor|plural|Plural|PLURAL}}<code><nowiki>{{plural:2|</nowiki>''is''<nowiki>|</nowiki>''are''<nowiki>}}</nowiki></code> | | {{Anchor|plural|Plural|PLURAL}}<code><nowiki>{{plural:2|</nowiki>''is''<nowiki>|</nowiki>''are''<nowiki>}}</nowiki></code> | ||
| <code><nowiki>{{plural:0|is|are}}</nowiki></code> → {{plural:0|is|are}} <br /> <code><nowiki>{{plural:1*1|is|are}}</nowiki></code> → {{plural:1*1|is|are}} <br /> <code><nowiki>{{plural:21 mod 10|is|are}}</nowiki></code> → {{plural:21 mod 10|is|are}} <br /> <code><nowiki>{{plural:{{#expr:21 mod 10}}|is|are}}</nowiki></code> → {{plural:{{#expr:21 mod 10}}|is|are}} <br /> <code><nowiki>{{plural:1|is|are}}</nowiki></code> → {{plural:1|is|are}} <br /> <code><nowiki>{{plural:2|is|are}}</nowiki></code> → {{plural:2|is|are}} <br /> <translate><!--T:232--> | | <code><nowiki>{{plural:0|is|are}}</nowiki></code> → {{plural:0|is|are}} <br /> <code><nowiki>{{plural:1*1|is|are}}</nowiki></code> → {{plural:1*1|is|are}} <br /> <code><nowiki>{{plural:21 mod 10|is|are}}</nowiki></code> → {{plural:21 mod 10|is|are}} <br /> <code><nowiki>{{plural:{{#expr:21 mod 10}}|is|are}}</nowiki></code> → {{plural:{{#expr:21 mod 10}}|is|are}} <br /> <code><nowiki>{{plural:1|is|are}}</nowiki></code> → {{plural:1|is|are}} <br /> <code><nowiki>{{plural:2|is|are}}</nowiki></code> → {{plural:2|is|are}} <br /> <translate><!--T:232--> | ||
− | (For [[ | + | (For [[w:Russian language|Russian]])</translate><br /><code><nowiki>{{PLURAL:5|1=Категория|Категории}} </nowiki></code> → Категории |
− | <br /><code><nowiki>{{PLURAL:3|страница|страниц | + | <br /><code><nowiki>{{PLURAL:3|страница|страницы|страниц}}</nowiki></code> → страницы<br /><code><nowiki>{{PLURAL:5|страница|страницы|страниц}}</nowiki></code> → страниц |
| <translate><!--T:233--> | | <translate><!--T:233--> | ||
− | Outputs the singular form (second parameter) if the first parameter is an expression equalling one; the plural form (third parameter) otherwise. Its functioning is [[<tvar|meta-help-magicwords>m:Special:MyLanguage/Help:Magic_words#Language-dependent_word_conversions</>|language-dependent]]. <br />Some language codes (ab, av, ba, bxr, ce, crh_cyrl, cv, inh, koi, krc, kv, lbe, lez, mhr, mrj, myv, ru, tt_cyrl, tyv, udm, xal) used 3 plural forms ([[ | + | Outputs the singular form (second parameter) if the first parameter is an expression equalling one; the plural form (third parameter) otherwise. Its functioning is [[<tvar|meta-help-magicwords>m:Special:MyLanguage/Help:Magic_words#Language-dependent_word_conversions</>|language-dependent]]. <br />Some language codes (ab, av, ba, bxr, ce, crh_cyrl, cv, inh, koi, krc, kv, lbe, lez, mhr, mrj, myv, ru, tt_cyrl, tyv, udm, xal) used 3 plural forms ([[betawiki:Thread:Portal talk:Ru/Plural changes in many languages|updated 01.2014]]): |
*Form 1: 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … | *Form 1: 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … | ||
− | *Form 2: 0, 5, 6, 7,8, | + | *Form 2: 0, 5, 6, 7, 8, …, 18, 19, 100, 1000, 10000, 100000, 1000000, … |
*Form 3: 2, 3, 4, 22, 23, 24, 32, 33, 34, 42, 43, 44, 52, 53, 54, 62, 102, 1002, …</translate> | *Form 3: 2, 3, 4, 22, 23, 24, 32, 33, 34, 42, 43, 44, 52, 53, 54, 62, 102, 1002, …</translate> | ||
| | | | ||
1,156行目: | 1,242行目: | ||
| <translate><!--T:234--> | | <translate><!--T:234--> | ||
Outputs the correct inflected form of the given word described by the inflection code after the colon ([[<tvar|meta-help-magicwords>m:Special:MyLanguage/Help:Magic_words#Language-dependent_word_conversions</>|language-dependent]]). Grammar transformations are used for inflected languages like Polish. See also <tvar|manual-wg-grammarform>{{mediawiki|Special:MyLanguage/Manual:$wgGrammarForms|$wgGrammarForms}}</>.</translate> | Outputs the correct inflected form of the given word described by the inflection code after the colon ([[<tvar|meta-help-magicwords>m:Special:MyLanguage/Help:Magic_words#Language-dependent_word_conversions</>|language-dependent]]). Grammar transformations are used for inflected languages like Polish. See also <tvar|manual-wg-grammarform>{{mediawiki|Special:MyLanguage/Manual:$wgGrammarForms|$wgGrammarForms}}</>.</translate> | ||
− | | {{MW version|version=1.7|compact=y|comment=and after}} | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after}} |
|- | |- | ||
− | | {{Anchor|gender|Gender|GENDER}}<code><nowiki>{{gender:username|text for | + | | {{Anchor|gender|Gender|GENDER}}<code><nowiki>{{gender:username|text for every gender}}</nowiki></code><br /> |
<code><nowiki>{{gender:Username|male text|female text|text for unspecified}}</nowiki></code><br /> | <code><nowiki>{{gender:Username|male text|female text|text for unspecified}}</nowiki></code><br /> | ||
<code><nowiki>{{gender:|male text|female text|text for unspecified}}</nowiki></code><br /> | <code><nowiki>{{gender:|male text|female text|text for unspecified}}</nowiki></code><br /> | ||
1,166行目: | 1,252行目: | ||
| <translate><!--T:236--> | | <translate><!--T:236--> | ||
A switch for the gender set in [[Special:Preferences]]. <br/> | A switch for the gender set in [[Special:Preferences]]. <br/> | ||
− | ''Note:'' | + | ''Note:'' The first example is basically a no-op<br/> |
− | | {{MW version|version=1.15|compact=y|comment=and after|r=46247}} | + | ''Note:'' If 3rd parameter is omitted and user hasn't defined his/her gender, then <code>''text if user is male''</code> is returned.<br>A blank username field (<tvar|gender><nowiki>{{gender:|</nowiki></>) means the current user, but can be used only in interface messages (MediaWiki namespace).<br> |
+ | A dot username (.) means the default user gender on this wiki.</translate> | ||
+ | | {{ {{TNTN|MW version}} |version=1.15|compact=y|comment=and after|r=46247}} | ||
|- | |- | ||
| {{Anchor|int|INT}}<code><nowiki>{{int:</nowiki><translate><!--T:285--> | | {{Anchor|int|INT}}<code><nowiki>{{int:</nowiki><translate><!--T:285--> | ||
''message name''</translate><nowiki>}}</nowiki> | ''message name''</translate><nowiki>}}</nowiki> | ||
| <code><nowiki>{{int:</nowiki>edit<nowiki>}}</nowiki></code> → '''{{int:edit}}''' <br /><small>''<translate><!--T:237--> | | <code><nowiki>{{int:</nowiki>edit<nowiki>}}</nowiki></code> → '''{{int:edit}}''' <br /><small>''<translate><!--T:237--> | ||
− | (Depends on user language; try: [{{fullurl:{{FULLPAGENAME}}|uselang=fr}}#Localisation fr] | + | (Depends on user language; try: [{{fullurl:{{FULLPAGENAME}}|uselang=fr}}#Localisation fr] • [{{fullurl:{{FULLPAGENAME}}|uselang=ja}}#Localisation ja])</translate>''</small> |
| <translate><!--T:238--> | | <translate><!--T:238--> | ||
− | Internationalizes (translates) the given '''int'''erface (MediaWiki namespace) message into the user language. For <code>msgnw</code> and other transclusion magic words, see [[<tvar| | + | Internationalizes (translates) the given '''int'''erface (MediaWiki namespace) message into the user language. For <code>msgnw</code> and other transclusion magic words, see the [[<tvar|sec>#Transclusion modifiers</>|Transclusion modifiers]] section. |
− | ''Note that this can | + | ''Note that this can damage / confuse cache consistency in MediaWiki 1.17 and earlier, see [[bugzilla:14404|bug 14404]].''</translate> |
| | | | ||
|- | |- | ||
1,181行目: | 1,269行目: | ||
| <code><nowiki>{{int:editsectionhint|MediaWiki}}</nowiki></code> → '''{{int:editsectionhint|MediaWiki}}''' | | <code><nowiki>{{int:editsectionhint|MediaWiki}}</nowiki></code> → '''{{int:editsectionhint|MediaWiki}}''' | ||
| <translate><!--T:239--> | | <translate><!--T:239--> | ||
− | You may also use parameters with translations. <br />Parameters are designated in messages with: $1, $2, $3, | + | You may also use parameters with translations. <br />Parameters are designated in messages with: $1, $2, $3, etc. <br />For example, here is the message for ''editsectionhint'': Edit section: $1 <br />In this example, MediaWiki replaces $1.</translate> |
| | | | ||
|} | |} | ||
+ | {{anchor|Transclusion modifiers}} | ||
+ | <translate> | ||
+ | |||
+ | === Transclusion modifiers === <!--T:308--> | ||
+ | |||
+ | <!--T:309--> | ||
+ | <nowiki>{{</nowiki>''Page name''|''optional params''}} usually transcludes another page, by default from the Template:namespace.</translate> | ||
<translate> | <translate> | ||
+ | <!--T:310--> | ||
+ | These magic words modify that behavior. | ||
+ | </translate> | ||
+ | {| class="wikitable plainlinks" | ||
+ | ! width="15%" | <translate><!--T:311--> | ||
+ | Usage</translate> | ||
+ | ! width="15%" | <translate><!--T:312--> | ||
+ | Output</translate> | ||
+ | ! <translate><!--T:313--> | ||
+ | Description</translate> | ||
+ | ! width="10%" | <translate><!--T:314--> | ||
+ | Version</translate> | ||
+ | |- | ||
+ | | <nowiki>{{:xyz}}</nowiki> | ||
+ | | | ||
+ | | <translate><!--T:315--> | ||
+ | A bare colon is not a template modifier, it's the prefix for the main namespace.</translate> <translate><!--T:316--> | ||
+ | Since transclusion defaults to the Template namespace, you would use for example, <tvar|code1>{{:UTC}}</> (vs. <tvar|code2>{{UTC}}</>) to include the text of the main namespace article UTC rather than Template:UTC.</translate> | ||
+ | | | ||
+ | |- | ||
+ | | <nowiki>{{int:xyz}}</nowiki> | ||
+ | | | ||
+ | | <translate><!--T:317--> | ||
+ | Same as <tvar|mw><nowiki>{{MediaWiki:xyz}}</nowiki></>, except standard message translation is applied depending on subpages and content/user/uselang language.</translate> <translate><!--T:318--> | ||
+ | Another difference is: this doesn't appear under "<tvar|translatesused>{{int|templatesused}}</>".</translate> <translate><!--T:319--> | ||
+ | Rendered as <tvar|int>{{int:xyz}}</> if <tvar|mw>[[MediaWiki:xyz]]</> doesn't exist.</translate> <translate><!--T:320--> | ||
+ | See also <tvar|1>{{ll|Help:System message}}</>.</translate> | ||
+ | | | ||
+ | |- | ||
+ | | <nowiki>{{msg:xyz}}</nowiki> | ||
+ | | | ||
+ | | <translate><!--T:321--> | ||
+ | Even if there is a magic word named "xyz", use template:xyz unless the template doesn't exist (equivalent to <tvar|code><nowiki>{{template:xyz}}</nowiki></>).</translate> <translate><!--T:322--> | ||
+ | Normally, magic words have priority when there is a conflict.</translate> | ||
+ | | | ||
+ | |- | ||
+ | | <nowiki>{{msgnw:xyz}}</nowiki> | ||
+ | | | ||
+ | | <translate><!--T:323--> | ||
+ | The unexpanded wikitext is rendered (more or less, for details see <tvar|msgnw>{{ll|Help:Template#msgnw|msgnw}}</>).</translate> | ||
+ | | | ||
+ | |- | ||
+ | | <nowiki>{{raw:xyz}}</nowiki> | ||
+ | | | ||
+ | | <translate><!--T:324--> | ||
+ | Equivalent to <tvar|msg><code><nowiki>{{msg:xyz}}</nowiki></code></> above.</translate> | ||
+ | | {{TNT|MW version|version=1.6|compact=y|comment=and after|r=12925}} | ||
+ | |- | ||
+ | | <nowiki>{{subst:xyz}}</nowiki> | ||
+ | | | ||
+ | | <translate><!--T:325--> | ||
+ | In the wikitext, the tag is substituted by the ''content'' (single-level evaluation only), see [[<tvar|usage>Special:MyLanguage/Help:template#Usage</>|Template usage]].</translate> | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | {{anchor|Miscellaneous}} | ||
+ | <translate> | ||
=== Miscellaneous === <!--T:240--> | === Miscellaneous === <!--T:240--> | ||
</translate> | </translate> | ||
{| class="wikitable plainlinks" | {| class="wikitable plainlinks" | ||
− | ! <translate><!--T:241--> | + | ! width="15%" | <translate><!--T:241--> |
Usage</translate> | Usage</translate> | ||
− | ! <translate><!--T:242--> | + | ! width="15%" | <translate><!--T:242--> |
Output</translate> | Output</translate> | ||
! <translate><!--T:243--> | ! <translate><!--T:243--> | ||
Description</translate> | Description</translate> | ||
− | ! <translate><!--T:244--> | + | ! width="10%" | <translate><!--T:244--> |
Version</translate> | Version</translate> | ||
|- | |- | ||
| <translate><!--T:286--> | | <translate><!--T:286--> | ||
− | <tvar|code1><code><nowiki>{{#language:</nowiki></>''language code''<tvar|code2><nowiki>}}</nowiki></code><br /><code><nowiki>{{#language:ar}}</nowiki></code> <br /><code><nowiki>{{#language:</nowiki></>''language code''<tvar|code3><nowiki>|</nowiki></>''target language code''<tvar|code5><nowiki>}}</nowiki></code> <br /><code><nowiki>{{#language:ar|en}}</nowiki></code></></translate> | + | <tvar|code1><code><nowiki>{{#language:</nowiki></>''language code''<tvar|code2><nowiki>}}</nowiki></code><br /><code><nowiki>{{#language:ar}}</nowiki></code> <br /><code><nowiki>{{#language:</nowiki></>''language code''<tvar|code3><nowiki>|</nowiki><br /></>''target language code''<tvar|code5><nowiki>}}</nowiki></code> <br /><code><nowiki>{{#language:ar|en}}</nowiki></code></></translate> |
| {{#language:language code}} <br />{{#language:ar}} <br />{{#language:language code|<translate><!--T:287--> | | {{#language:language code}} <br />{{#language:ar}} <br />{{#language:language code|<translate><!--T:287--> | ||
target language code<tvar|code1>}} <br /></>Arabic</translate> | target language code<tvar|code1>}} <br /></>Arabic</translate> | ||
| <translate><!--T:245--> | | <translate><!--T:245--> | ||
− | The full name of the language for the given [[<tvar|manual-langcode>Special:MyLanguage/Manual:Language#lang-code</>|language code]]: native name (language autonym) by default, name translated in target language if a target language code is specified. | + | The full name of the language for the given [[<tvar|manual-langcode>Special:MyLanguage/Manual:Language#lang-code</>|language code]]: native name (language autonym) by default, name translated in target language if a target language code is specified. <tvar|ext-cldr>{{ll|Extension:CLDR}}</> must be installed for the translation to work.</translate> |
− | | {{MW version|version=1.7|compact=y|comment=and after|r=14490}}<br /> {{MW version|version=1.18|compact=y|comment=and after|r=91875}} <translate><!--T:246--> | + | | {{ {{TNTN|MW version}} |version=1.7|compact=y|comment=and after|r=14490}}<br /> {{ {{TNTN|MW version}} |version=1.18|compact=y|comment=and after|r=91875}} <translate><!--T:246--> |
(translation)</translate> | (translation)</translate> | ||
|- | |- | ||
1,214行目: | 1,366行目: | ||
| <translate><!--T:247--> | | <translate><!--T:247--> | ||
The localized name for the given canonical Special: page.</translate> | The localized name for the given canonical Special: page.</translate> | ||
− | | {{MW version|version=1.9|compact=y|comment=and after|r=17321}} | + | | {{ {{TNTN|MW version}} |version=1.9|compact=y|comment=and after|r=17321}} |
|- | |- | ||
| <code><nowiki>{{#speciale:</nowiki><translate><!--T:289--> | | <code><nowiki>{{#speciale:</nowiki><translate><!--T:289--> | ||
1,221行目: | 1,373行目: | ||
| <translate><!--T:248--> | | <translate><!--T:248--> | ||
The localized and URL-encoded name for the given canonical Special: page.</translate> | The localized and URL-encoded name for the given canonical Special: page.</translate> | ||
− | | {{MW version|version=1.20|compact=y|comment=and after|gerrit change=4340}} | + | | {{ {{TNTN|MW version}} |version=1.20|compact=y|comment=and after|gerrit change=4340}} |
|- | |- | ||
| <code><nowiki>{{#tag:</nowiki><translate><!--T:290--> | | <code><nowiki>{{#tag:</nowiki><translate><!--T:290--> | ||
1,228行目: | 1,380行目: | ||
''(Depends on parser tag)''</translate> | ''(Depends on parser tag)''</translate> | ||
| <translate><!--T:250--> | | <translate><!--T:250--> | ||
− | Alias for XML-style MediaWiki parser tags or extension tags. It allows execution of wiki code and | + | Alias for XML-style MediaWiki parser tags or extension tags. It allows execution of wiki code and <tvar|ext-pf>{{ll|Extension:ParserFunctions}}</> within tags before the tag is processed. It also prevents parsing of tags in conditional paths that aren't executed (like in <code>#if</code> statements). Content between tags is passed as the first parameter, and any attributes for the tags can be passed as subsequent parameters. This example: |
<!--T:251--> | <!--T:251--> | ||
− | <tvar|code1><code><</>tagname ''attribute1''="''value1''" ''attribute2''="''value2''"<tvar|code2>></code></>''Your content goes here''<tvar|code3><code><</>/tagname<tvar|code4>></code></> | + | <tvar|code1><code><</>tagname ''attribute1''="''value1''"<br />''attribute2''="''value2''"<tvar|code2>></code></>''Your content goes here''<tvar|code3><code><</>/tagname<tvar|code4>></code></> |
<!--T:252--> | <!--T:252--> | ||
1,244行目: | 1,396行目: | ||
<!--T:255--> | <!--T:255--> | ||
− | <code><nowiki>{{#tag:ref|Citation text goes here, and you can include parser functions like {{#expr: ... }} and magic words like {{PAGENAME}}.|name="multiple"}}</nowiki></code> | + | <code><nowiki>{{#tag:ref|Citation text goes here,</nowiki><br /><nowiki>and you can include parser functions</nowiki><br /><nowiki>like {{#expr: ... }} and magic words</nowiki><br /><nowiki>like {{PAGENAME}}.|name="multiple"}}</nowiki></code> |
</translate> | </translate> | ||
<small>{{TNT|warning}}<translate><!--T:256--> | <small>{{TNT|warning}}<translate><!--T:256--> | ||
− | You must write <tvar|code1><code><nowiki>{{#tag:</nowiki></code></>''tagname''<tvar|code2><code><nowiki>||</nowiki></code></>''attribute1''=''value1''<tvar|code3><code><nowiki>|</nowiki></code></>''attribute2''=''value2''<tvar|code4><code><nowiki>}}</nowiki></code></> to pass an empty content. No space is permitted in the area reserved for content between the pipe | + | You must write <tvar|code1><code><nowiki>{{#tag:</nowiki></code></>''tagname''<tvar|code2><code><nowiki>||</nowiki></code></>''attribute1''=''value1''<tvar|code3><code><nowiki>|</nowiki></code></>''attribute2''=''value2''<tvar|code4><code><nowiki>}}</nowiki></code></> to pass an empty content. No space is permitted in the area reserved for content between the pipe characters <tvar|code5><code>{{!}}{{!}}</code></> before ''attribute1''.</translate></small> |
− | | {{MW version|version=1.12|compact=y|comment=and after|r=29482}} | + | | {{ {{TNTN|MW version}} |version=1.12|compact=y|comment=and after|r=29482}} |
|} | |} | ||
− | [[Category:Help{{ | + | [[Category:Help{{translation}}|{{PAGENAME}}]] |
− | [[Category:Time{{ | + | [[Category:Time{{translation}}|{{PAGENAME}}]] |
− | [[Category:Magic words{{ | + | [[Category:Magic words{{translation}}|{{PAGENAME}}]] |
2016年7月24日 (日) 00:25時点における最新版
Note: When you edit this page, you agree to release your contribution under the CC0. See Public Domain Help Pages for more info.
|
Magic words are strings of text that MediaWiki associates with a return value or function, such as time, site details, or page names. This page explains only the standard magic words; for a technical reference, see Manual:Magic words.
There are three general types of magic words:
- Behavior switches: these are uppercase words surrounded by double underscores, e.g. __FOO__.
- Variables: these are uppercase words surrounded by double braces, e.g.
{{FOO}}
. As such, they look a lot like templates.
- Parser functions: these take parameters and are either of the form
{{foo:...}}
or{{#foo:...}}
. See also Help:Extension:ParserFunctions.
Variables and parser functions can use subst:, just like templates. Page-dependent magic words will affect or return data about the current page (by default), even if the word is added through a transcluded template or included system message.
Behavior switches[編集]
A behavior switch controls the layout or behavior of the page and can often be used to specify desired omissions and inclusions in the content.
Word | Description | Versions | |
---|---|---|---|
Table of contents | |||
__NOTOC__
|
Hides the table of contents (TOC). | ||
__FORCETOC__
|
Forces the table of contents to appear at its normal position (before the first header, overriding __NOTOC__ ).
|
||
__TOC__
|
Places a table of contents at the word's current position (overriding __NOTOC__ ). If this is used multiple times, the table of contents will appear at the first word's position.
|
||
Editing | |||
__NOEDITSECTION__
|
Hides the section edit links beside headings. This is especially useful where a heading is created from within a template: the normal wiki section-edit would in this case edit the template code, which is normally counterintuitive to the user. Use of this in a template will extend the effect to that template, the pages it's included on, and any other templates included on the same page. For a workaround, see here. | ||
__NEWSECTIONLINK__
|
Adds a link beside the "edit" tab for adding a new section on a non-talk page (see Adding a section to the end). |
| |
__NONEWSECTIONLINK__
|
Removes the link beside the "edit" tab on pages in talk namespaces. |
| |
Categories | |||
__NOGALLERY__
|
Used on a category page, replaces thumbnails in the category view with normal links. |
| |
__HIDDENCAT__
|
Used on a category page, hides the category from the lists of categories in its members and parent categories (there is an option in the user preferences to show them). |
| |
Language conversion | |||
__NOCONTENTCONVERT__ __NOCC__
|
On wikis with language variants, don't perform any content language conversion (character and phase) in article display; for example, only show Chinese (zh) instead of variants like zh_cn, zh_tw, zh_sg, or zh_hk. | ||
__NOTITLECONVERT__ __NOTC__
|
On wikis with language variants, don't perform language conversion on the title (all other content is converted). | ||
Other | |||
__START__
|
No effect. Was used to point where database message starts after comment that should not be transcluded. Removed in r1695 and completely removed in r24784 |
| |
__END__
|
Explicitly marks the end of the article, to prevent MediaWiki from removing trailing whitespace. Removed in 19213. |
| |
__INDEX__
|
Tell search engines to index the page (overrides $wgArticleRobotPolicies, but not robots.txt). It obeys $wgExemptFromUserRobotsControl variable. |
| |
__NOINDEX__
|
Tell search engines not to index the page (i.e. do not list in search engines' results). It obeys $wgExemptFromUserRobotsControl variable. |
| |
__STATICREDIRECT__
|
On redirect pages, don't allow MediaWiki to automatically update the link when someone moves a page and checks "このページへのリダイレクトがあればそのリダイレクトを修正" (which requires $wgFixDoubleRedirects). |
|
Variables[編集]
Variables return information about the current page, wiki, or date. Their syntax is similar to templates. Variables marked as "[expensive]" are tracked by the software, and the number that can be included on a page is limited.
If a template name conflicts with a variable, the variable will be used (so to transclude the template テンプレート:PAGENAME you would need to write {{テンプレート:PAGENAME}}
). In some cases, adding parameters will force the parser to invoke a template; for example, {{CURRENTDAYNAME|x}}
transcludes テンプレート:CURRENTDAYNAME, not the variable.
Date and time[編集]
The following variables return the current date and time in UTC.
Due to MediaWiki and browser caching, these variables frequently show when the page was cached rather than the current time.
The date and time magic words are formatted in the wiki content language. Since 1.19, they depend on the page content language.
Variable | Output | Description | Versions | |
---|---|---|---|---|
Year | ||||
{{CURRENTYEAR}}
|
2024 | Year | ||
Month | ||||
{{CURRENTMONTH}}
|
11 | Month (zero-padded number) | ||
{{CURRENTMONTH1}}
|
11 | Month (unpadded number) | ||
{{CURRENTMONTHNAME}}
|
11月 | Month (name) | ||
{{CURRENTMONTHNAMEGEN}}
|
11月 | Month (genitive form) | ||
{{CURRENTMONTHABBREV}}
|
11月 | Month (abbreviation) |
| |
Day | ||||
{{CURRENTDAY}}
|
24 | Day of the month (unpadded number) | ||
{{CURRENTDAY2}}
|
24 | Day of the month (zero-padded number) |
| |
{{CURRENTDOW}}
|
0 | Day of the week (unpadded number), 0 (for Sunday) through 6 (for Saturday) | ||
{{CURRENTDAYNAME}}
|
日曜日 | Day of the week (name) | ||
Time | ||||
{{CURRENTTIME}}
|
11:27 | Time (24-hour HH:mm format) | ||
{{CURRENTHOUR}}
|
11 | Hour (24-hour zero-padded number) | ||
Other | ||||
{{CURRENTWEEK}}
|
47 | Week (number) | ||
{{CURRENTTIMESTAMP}}
|
20241124112714 | YYYYMMDDHHmmss timestamp |
|
The following variables do the same as the preceding ones, but using the site's server config or $wgLocaltimezone.
-
{{LOCALYEAR}}
- {{LOCALMONTH}}
- {{LOCALMONTH1}}
- {{LOCALMONTHNAME}}
- {{LOCALMONTHNAMEGEN}}
- {{LOCALMONTHABBREV}}
- {{LOCALDAY}}
- {{LOCALDAY2}}
- {{LOCALDOW}}
- {{LOCALDAYNAME}}
- {{LOCALTIME}}
- {{LOCALHOUR}}
- {{LOCALWEEK}}
- {{LOCALTIMESTAMP}}
For more thorough time formatting, you may want to install Extension:ParserFunctions to use the #time parser function.
Technical metadata[編集]
Note: Revision variables return data about the latest edit to the current page, even if viewing an older version of the page.
Variable | Output | Description | Versions | ||
---|---|---|---|---|---|
Site | |||||
{{SITENAME}}
|
ひつじ小屋別館2代目 | The wiki's site name ($wgSitename). | |||
{{SERVER}}
|
http://littleprincess.sakura.ne.jp | Domain URL ($wgServer). | |||
{{SERVERNAME}}
|
littleprincess.sakura.ne.jp | Subdomain and domain name (no longer dependent on $wgServerName as of version 1.17). | |||
{{DIRMARK}} {{DIRECTIONMARK}}
|
|
Outputs a Unicode directional mark that matches the wiki's default language's direction (‎ on left-to-right wikis, ‏ on right-to-left wikis), useful in text with multi-directional text. Since 1.19, it depends on the page content language.
|
| ||
{{SCRIPTPATH}}
|
/mediawiki | Relative script path ($wgScriptPath). | |||
{{STYLEPATH}}
|
/mediawiki/skins | Relative style path ($wgStylePath). |
| ||
{{CURRENTVERSION}}
|
1.27.0 | The wiki's MediaWiki version. |
| ||
{{CONTENTLANGUAGE}} {{CONTENTLANG}}
|
ja ja |
The wiki's default interface language ($wgLanguageCode). |
| ||
Page | |||||
{{PAGEID}}
|
714 | Returns the page identifier. |
| ||
{{PROTECTIONLEVEL:action}}
|
Outputs the protection level (e.g. "autoconfirmed", "sysop") for a given action (e.g. "edit", "move") on the current page. Returns an empty string if not protected. |
| |||
{{PROTECTIONEXPIRY:action}}
|
Outputs the protection expiry (e.g. "20160418155030", "infinity") for a given action (e.g. "edit", "move") on the current page. Returns "infinity" if not protected. |
| |||
{{CASCADINGSOURCES}}
|
[Expensive] Returns the sources of any cascading protection acting on the current page. Pages will not return their own title unless they transclude themselves. |
| |||
Latest revision to current page | |||||
{{REVISIONID}}
|
4654 | Unique revision ID. |
| ||
{{REVISIONDAY}}
|
24 | Day edit was made (unpadded number). |
| ||
{{REVISIONDAY2}}
|
24 | Day edit was made (zero-padded number). |
| ||
{{REVISIONMONTH}}
|
07 | Month edit was made (zero-padded number as of 1.17+, unpadded number in prior versions). |
| ||
{{REVISIONMONTH1}}
|
7 | Month edit was made (unpadded number). |
| ||
{{REVISIONYEAR}}
|
2016 | Year edit was made. |
| ||
{{REVISIONTIMESTAMP}}
|
20160724002537 | Timestamp as of time of edit. |
| ||
{{REVISIONUSER}}
|
しが | The username of the user who made the most recent edit to the page, or the current user when previewing an edit. |
| ||
{{REVISIONSIZE}}
|
82665 | The size (bytes of wikitext) of the current revision of this page |
| ||
Affects page content | |||||
{{DISPLAYTITLE:title}}
|
Format the current page's title header. The value must be equivalent to the default title: only capitalization changes to certain parts of the title (not all) and replacing spaces with underscores are allowed (this can be changed with $wgRestrictDisplayTitle). It can be disabled or enabled by $wgAllowDisplayTitle; disabled by default before 1.10+, enabled by default thereafter.
It can take a second argument of noerror or noreplace to suppress error messages when multiple displaytitles are used on one page or to make this displaytitle do nothing if a displaytitle was already specified earlier in the page. |
(for noerror and noreplace) | |||
{{DEFAULTSORT:sortkey}} {{DEFAULTSORTKEY:sortkey}} {{DEFAULTCATEGORYSORT:sortkey}} {{DEFAULTSORT:sortkey|noerror}} {{DEFAULTSORT:sortkey|noreplace}}
|
Used for categorizing pages, sets a default category sort key. For example if you put {{DEFAULTSORT:Smith , John}} at the end of John Smith, the page would be sorted under "S" by default in categories. It can take a second argument of noerror or noreplace to suppress error messages when multiple defaultsortkeys are used on one page or to make this defaultsort do nothing if a defaultsort was already specified earlier in the page.
|
(for noerror and noreplace) |
Statistics[編集]
Numbers returned by these variables normally contain separators (commas, dots or spaces, depending on the local language) but can return raw numbers with the ":R" flag (for example, {{NUMBEROFPAGES}}
→ 1,057 and {{NUMBEROFPAGES:R}}
→ 1057).
Use "|R" for magic words that require a parameter like PAGESINCATEGORY (for example {{PAGESINCATEGORY:Help}}
and {{PAGESINCATEGORY:Help|R}}
, or {{PAGESINCATEGORY:Help|subcats}}
and {{PAGESINCATEGORY:Help|subcats|R}}
). Also applicable to {{PAGESIZE:page name}}
hereinbefore.
The number magic words are formatted in the wiki content language. Since 1.19, it depends on the page content language.
Variable | Output | Description | Versions | |
---|---|---|---|---|
{{NUMBEROFPAGES}}
|
1,057 | Number of wiki pages. |
| |
{{NUMBEROFARTICLES}}
|
427 | Number of pages in content namespaces. | ||
{{NUMBEROFFILES}}
|
101 | Number of uploaded files. |
| |
{{NUMBEROFEDITS}}
|
2,806 | Number of wiki edits. |
| |
{{NUMBEROFVIEWS}}
|
Number of page views. Usually useless on a wiki using caching. Removed in Gerrit change 150699. |
| ||
{{NUMBEROFUSERS}}
|
199 | Number of registered users. |
| |
{{NUMBEROFADMINS}}
|
1 | Number of users in the sysop group. |
| |
{{NUMBEROFACTIVEUSERS}}
|
0 | Number of active users, based on the criteria used in Special:Statistics. |
| |
{{PAGESINCATEGORY:categoryname}} {{PAGESINCAT:categoryname}}
|
48 48 |
[Expensive] Number of pages (including subcategories and files) in the given category. (Category:Help used for demonstration) |
| |
{{PAGESINCATEGORY:categoryname|all}} {{PAGESINCATEGORY:categoryname|pages}} {{PAGESINCATEGORY:categoryname|subcats}} {{PAGESINCATEGORY:categoryname|files}}
|
48 48 0 0 |
[Expensive] Respectively, the number of
in the given category. (Category:Help used for demonstration) |
| |
{{NUMBERINGROUP:groupname}} {{NUMINGROUP:groupname}}
|
1 1 ({{NUMBERINGROUP:bureaucrat}} used here) |
Number of users in a specific group. |
| |
{{PAGESINNS:index}} {{PAGESINNAMESPACE:index}}
|
Not enabled | [Expensive] Number of pages in the given namespace (replace index with the relevant namespace index). For instance, {{PAGESINNAMESPACE:14}} will output the number of category pages. {{PAGESINNS:0}} differs from {{NUMBEROFARTICLES}} in that the former includes redirects and disambiguation pages. Disabled by default, enable with $wgAllowSlowParserFunctions.
|
|
Page names[編集]
Variable | Output | Description | Versions | |
---|---|---|---|---|
{{FULLPAGENAME}}
|
ヘルプ:Magic words | Namespace and full page title (including all subpage levels). |
| |
{{PAGENAME}}
|
Magic words | Full page title (including all subpage levels) without the namespace. | ||
{{BASEPAGENAME}}
|
Magic words | Page title of the page in the immediately superior subpage level without the namespace ("Title/foo" on "Help:Title/foo/bar").
For more complex splitting, use |
| |
{{SUBPAGENAME}}
|
Magic words | The subpage title ("bar" on "Help:Title/foo/bar"). |
| |
{{SUBJECTPAGENAME}} {{ARTICLEPAGENAME}}
|
ヘルプ:Magic words ヘルプ:Magic words |
Full page name of the associated subject (e.g. article or file). Useful on talk pages. |
| |
{{TALKPAGENAME}}
|
ヘルプ・トーク:Magic words | Full page name of the associated talk page. |
| |
{{ROOTPAGENAME}}
|
Magic words | Name of the root of the current page. Would return Title on page Help:Title/Foo/Bar
|
|
The {{BASEPAGENAME}}
and {{SUBPAGENAME}}
magic words only work in namespaces that have subpages enabled. See $wgNamespacesWithSubpages for information on enabling subpages.
As of 1.15+, these can all take a parameter, allowing specification of the page to be operated on, instead of just the current page:
-
{{PAGENAME:Template:Main Page}}
→ Main Page
テンプレート:Warning/core Page titles containing certain characters, such as apostrophes '
or asterisks *
, may produce unexpected results when handled with these magic words, e.g. {{PAGESINCATEGORY:{{PAGENAME}}}}
. See bugs T16779, T18474, T37628, and T37746. One simple way to fix this is wrapping the pagename in {{#titleparts:}}
from the ParserFunctions extension.
For example, if page name is "L'Aquila", the following code will produce the string "Numeric char encoding":
{{#switch:{{PAGENAME}} | L'Aquila = No translation | L = Not OK | L'Aquila = Entity escaping | L'Aquila = Numeric char encoding }}
URL encoded page names[編集]
The following are equivalents encoded for use in MediaWiki URLs (i.e. spaces replaced with underscores and some characters HTML escaped using numeric character encoding):
-
{{FULLPAGENAMEE}}
- {{PAGENAMEE}}
- {{BASEPAGENAMEE}}
- {{SUBPAGENAMEE}}
- {{SUBJECTPAGENAMEE}}
- {{ARTICLEPAGENAMEE}}
- {{TALKPAGENAMEE}}
- {{ROOTPAGENAMEE}}
Note that {{PAGENAME:...}}
, {{PAGENAMEE:...}}
and {{urlencode:...}}
have distinct implementations. See Manual:PAGENAMEE encoding for details.
Namespaces[編集]
Variable | Output | Description | Versions | |
---|---|---|---|---|
{{NAMESPACE}}
|
ヘルプ | Name of the page's namespace | ||
{{NAMESPACENUMBER}}
|
12 | ID of the page's namespace |
| |
{{SUBJECTSPACE}} {{ARTICLESPACE}}
|
ヘルプ ヘルプ |
Name of the associated content namespace |
| |
{{TALKSPACE}}
|
ヘルプ・トーク | Name of the associated talk namespace |
|
The following are equivalents encoded for use in MediaWiki URLs (spaces replaced with underscores and some characters percent-encoded):
-
{{NAMESPACEE}}
-
{{SUBJECTSPACEE}}
-
{{ARTICLESPACEE}}
-
{{TALKSPACEE}}
As of 1.15+, these can take a full-page-name parameter and will return the requested namespace associated with that page, instead of with the current page:
-
{{NAMESPACE:Template:Main Page}}
→ テンプレート -
{{SUBJECTSPACE:Template:Main Page}}
→ テンプレート -
{{TALKSPACE:Template:Main Page}}
→ テンプレート・トーク
Parameter must not be a namespace name:
-
{{SUBJECTSPACE:Help talk}}
→ (Empty)
Other[編集]
Variable | Output | Description | Versions | |
---|---|---|---|---|
{{!}}
|
| | Used to include a pipe character as part of a template argument or table cell contents. Before this was added as a magic word, many wikis implemented this by creating Template:! with | as the content.
|
|
Parser functions[編集]
Parser functions are very similar to variables, but take one or more parameters (technically, any magic word that takes a parameter is a parser function), and the name is sometimes prefixed with a hash to distinguish them from templates.
This page only describes parser functions that are integral to the MediaWiki software. Other parser functions may be added by MediaWiki extensions such as the Extension:ParserFunctions. For those see Help:Extension:ParserFunctions.
Technical metadata of another page[編集]
Parser function | Output (for page MediaWiki) |
Description | Versions | |
---|---|---|---|---|
{{PAGEID: page name }}
|
890 | [Expensive] Returns the page identifier of the specified page*. |
| |
{{PAGESIZE: page name }} {{PAGESIZE: page name |R}}
|
157 157 |
[Expensive] Returns the byte size of the specified page. Use "<code>|R" to get raw (unformatted) numbers. |
| |
{{PROTECTIONLEVEL:action | page name}}
|
[Expensive] Outputs the protection level (e.g. "autoconfirmed", "sysop") for a given action (e.g. "edit", "move") on the specified page. Returns an empty string if not protected. |
| ||
{{PROTECTIONEXPIRY:
|
[Expensive] Outputs the protection expiry (e.g. "20160418155030", "infinity") for a given action (e.g. "edit", "move") on the specified page. Returns "infinity" if not protected. |
| ||
{{CASCADINGSOURCES: page name}}
|
[Expensive] Returns the sources of any cascading protection acting on the specified page. Pages will not return their own title unless they transclude themselves. |
| ||
{{REVISIONID: page name }}
|
4760 | [Expensive] Unique revision ID of the last revision on the specified page*. |
| |
{{REVISIONDAY: page name }}
|
24 | [Expensive] Day of edit from the last revision of the specified page* (unpadded number). |
| |
{{REVISIONDAY2: page name }}
|
24 | [Expensive] Day of edit from the last revision of the specified page* (zero-padded number). |
| |
{{REVISIONMONTH: page name }}
|
07 | [Expensive] Month of edit from the last revision of the specified page* (zero-padded number as of 1.17+, unpadded number in prior versions). |
| |
{{REVISIONMONTH1: page name }}
|
7 | [Expensive] Month of edit from the last revision of the specified page* (unpadded number). |
| |
{{REVISIONYEAR: page name }}
|
2016 | [Expensive] Year of edit from the last revision of the specified page*. |
| |
{{REVISIONTIMESTAMP: page name }}
|
20160724002620 | [Expensive] Timestamp as of time of edit on the specified page*. |
| |
{{REVISIONUSER: page name }}
|
しが | [Expensive] The username from the last revision on the specified page*. |
| |
*When the given param is equal to the current title of the parser, the parser function will yield the previous versions on preview and on substitution, that includes empty strings when used on page creation, but using the values from the current version for page view, including viewing old revisions. In this case it is a non-expensive parser function. |
URL data[編集]
Parser function | Input → Output | Description | Versions | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{localurl:page name}} {{localurl:page name
|
{{localurl:MediaWiki}} → /mediawiki/index.php?title=MediaWiki {{localurl:MediaWiki|printable=yes}} → /mediawiki/index.php?title=MediaWiki&printable=yes |
The relative path to the title. | |||||||||||||||
{{fullurl:page name}} {{fullurl:page name {{fullurl:interwiki:remote page name
|
{{fullurl:Category:Top level}} → http://littleprincess.sakura.ne.jp/mediawiki/index.php?title=%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA:Top_level
|
A protocol-relative path to the title. This will also resolve interwiki prefixes. Note: Unbracketed (plain) protocol-relative links are not automagically linked. |
| ||||||||||||||
{{canonicalurl:page name}} {{canonicalurl:page name {{canonicalurl:interwiki:remote page name
|
{{canonicalurl:Category:Top level}} → http://littleprincess.sakura.ne.jp/mediawiki/index.php?title=%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA:Top_level
|
The absolute path to the title, using the canonical URL. This will also resolve interwiki prefixes. |
| ||||||||||||||
{{filepath:file name}} {{filepath:file name|nowiki}} {{filepath:file name|thumbnail_size}}
|
{{filepath:Wiki.png}} → http://littleprincess.sakura.ne.jp/mediawiki/images/b/bc/Wiki.png
|
A protocol-relative path to the full size or thumbnail (1.18+) of a media file. |
| ||||||||||||||
{{urlencode:string}} or {{urlencode:string|QUERY}} {{urlencode:string|WIKI}} {{urlencode:string|PATH}}
|
{{urlencode:x:y/z á é}} or {{urlencode:x:y/z á é|QUERY}} → x%3Ay%2Fz+%C3%A1+%C3%A9 {{urlencode:x:y/z á é|WIKI}} → x:y/z_%C3%A1_%C3%A9 {{urlencode:x:y/z á é|PATH}} → x%3Ay%2Fz%20%C3%A1%20%C3%A9 Note that the default changed from |
The input encoded for use in URLs. Note that there is no urldecode function like there is in the obsolete Extension:StringFunctions.
|
| ||||||||||||||
{{anchorencode:string}}
|
{{anchorencode:x y z á é}} → x_y_z_.C3.A1_.C3.A9 |
The input encoded for use in URL section anchors (after the “#” symbol in a URL). |
|
Namespaces[編集]
{{ns:}}
returns the current localized name for the namespace with that index, canonical name, or local alias. Thus {{ns:6}}
, {{ns:File}}
, and {{ns:Image}}
(an old name for the File namespace) all return "ファイル". On a wiki where the content language is French, {{ns:Fichier}}
is also valid, but {{ns:Datei}}
(the localisation of "File" in German) is not.
{{nse:}}
is the equivalent encoded for MediaWiki URLs. It does the same, but it replaces spaces with underscores, making it usable in external links.
Content namespaces | Talk namespaces | |||
---|---|---|---|---|
Usage | Output | Usage | Output | |
{{ns:-2}} / {{ns:Media}}
|
メディア | {{ns:-1}} / {{ns:Special}}
|
特別 (no talk page) | |
{{ns:0}} / {{ns:}}
|
{{ns:1}} / {{ns:Talk}}
|
トーク | ||
{{ns:2}} / {{ns:User}}
|
利用者 | {{ns:3}} / {{ns:User talk}}
|
利用者・トーク | |
{{ns:4}} / {{ns:Project}}
|
ひつじ小屋別館2代目 Varies between wikis |
{{ns:5}} / {{ns:Project talk}}
|
ひつじ小屋別館2代目・トーク | |
{{ns:6}} / {{ns:File}} or {{ns:Image}}
|
ファイル | {{ns:7}} / {{ns:File talk}} or {{ns:Image talk}}
|
ファイル・トーク | |
{{ns:8}} / {{ns:MediaWiki}}
|
MediaWiki | {{ns:9}} / {{ns:MediaWiki talk}}
|
MediaWiki・トーク | |
{{ns:10}} / {{ns:Template}}
|
テンプレート | {{ns:11}} / {{ns:Template talk}}
|
テンプレート・トーク | |
{{ns:12}} / {{ns:Help}}
|
ヘルプ | {{ns:13}} / {{ns:Help talk}}
|
ヘルプ・トーク | |
{{ns:14}} / {{ns:Category}}
|
カテゴリ | {{ns:15}} / {{ns:Category talk}}
|
カテゴリ・トーク |
Don't confuse localised namespaces with custom namespaces.
Formatting[編集]
Usage | Input → Output | Description | Version | ||
---|---|---|---|---|---|
{{formatnum:unformatted number}}
|
Unsupported: Examples of wrong input (unreliable output), with or without |
Takes an unformatted number (arab, no group separators and . as decimal separator) and outputs it in the localized digit script and formatted with decimal and decimal group separators, according to the wiki's default locale. The テンプレート:Warning/core Leading zeroes are not removed, you can use {{#expr:00001}} instead if you have Extension:ParserFunctions installed. テンプレート:Warning/core If you don't input numbers in the exact format required, don't expect any reliable output, especially on non-English wikis. If you really need to format (according the wiki's locale) a number in unknown input format, you could try and use |
| ||
|
|
Formats an unlinked date based on user "date format" preference, and adds metadata tagging it as a formatted date. For logged-out users and those who have not set a date format in their preferences, dates can be given a default: mdy , dmy , ymd , ISO 8601 (all case sensitive). If only the month and day are given, only mdy and dmy are valid. If a format is not specified or is invalid, the input format is used as a default. If the supplied date is not recognized as a valid date (specifically, if it contains any metadata such as from a nested use of these or similar templates), it is rendered unchanged, and no (additional) metadata is generated. テンプレート:Warning/coreAlthough the ISO 8601 standard requires that dates be in the Gregorian calendar, the ISO parameter in this function will still format dates that fall outside the usual Gregorian range (e.g. dates prior to 1583). Also, the magic word cannot properly convert between negative years (used with ISO 8601) and years BC or years BCE (used in general writing). |
| ||
{{lc:string}}
|
{{lc:DATA CENTER}} → data center
|
The lowercase input. |
| ||
{{lcfirst:string}}
|
{{lcfirst:DATA center}} → dATA center
|
The input with the very first character lowercase. |
| ||
{{uc:string}}
|
{{uc:text transform}} → TEXT TRANSFORM
|
The uppercase input. |
| ||
{{ucfirst:string}}
|
{{ucfirst:text TRANSFORM}} → Text TRANSFORM
|
The input with the very first character uppercase. |
| ||
{{padleft:xyz|stringlength}}
|
{{padleft:xyz|5}} → 00xyz
|
Inserts a string of padding characters (character chosen in third parameter; default "0") of a specified length (second parameter) next to a chosen base character or variable (first parameter). The final digits or characters in the base replace the final characters in the padding; i.e. {{padleft:44|3|0}} produces 044. The padding string may be truncated if its length does not evenly divide the required number of characters.
Only the first character of the third parameter is used in versions up to 1.12, but by version 1.15 all the characters are used. Bug (fixed in r45734): multibyte characters are interpreted as two characters, which can skew width. These also cannot be used as padding characters. |
| ||
{{padright:xyz|stringlength}} {{padright:xyz|strlen|char}} {{padright:xyz|strlen|string}}
|
{{padright:xyz|5}} → xyz00
|
Identical to padleft , but adds padding characters to the right side.
|
|
See also: Extension:StringFunctions.
Localization[編集]
Here are the magic words which are used as main localisation tools. Other magic words will often depend on the wiki's locale and configuration or on the chosen language: see in particular #Date and time, #Formatting, #Miscellaneous. More magic words are added by the Extension:Translate.
The usage of these magic words can be very complex, and the documentation is currently incomplete; there's some more info on PLURAL, GRAMMAR, GENDER.
Usage | Input → Output | Description | Version | |
---|---|---|---|---|
{{plural:2|is|are}}
|
{{plural:0|is|are}} → are {{plural:1*1|is|are}} → is {{plural:21 mod 10|is|are}} → are {{plural:{{#expr:21 mod 10}}|is|are}} → is {{plural:1|is|are}} → is {{plural:2|is|are}} → are (For Russian) {{PLURAL:5|1=Категория|Категории}} → Категории
|
Outputs the singular form (second parameter) if the first parameter is an expression equalling one; the plural form (third parameter) otherwise. Its functioning is language-dependent. Some language codes (ab, av, ba, bxr, ce, crh_cyrl, cv, inh, koi, krc, kv, lbe, lez, mhr, mrj, myv, ru, tt_cyrl, tyv, udm, xal) used 3 plural forms (updated 01.2014):
|
||
{{grammar:N|noun}}
|
Outputs the correct inflected form of the given word described by the inflection code after the colon (language-dependent). Grammar transformations are used for inflected languages like Polish. See also $wgGrammarForms. |
| ||
{{gender:username|text for every gender}}
|
(Depends on the named user's gender) | A switch for the gender set in Special:Preferences. Note: The first example is basically a no-op |
| |
{{int:message name}}
|
<code>{{int:edit}} → 編集 (Depends on user language; try: fr • ja) |
Internationalizes (translates) the given interface (MediaWiki namespace) message into the user language. For msgnw and other transclusion magic words, see the Transclusion modifiers section.
Note that this can damage / confuse cache consistency in MediaWiki 1.17 and earlier, see bug 14404. |
||
{{int:editsectionhint|MediaWiki}}
|
<code>{{int:editsectionhint|MediaWiki}} → 節を編集: MediaWiki | You may also use parameters with translations. Parameters are designated in messages with: $1, $2, $3, etc. For example, here is the message for editsectionhint: Edit section: $1 In this example, MediaWiki replaces $1. |
Transclusion modifiers[編集]
{{Page name|optional params}} usually transcludes another page, by default from the Template:namespace. These magic words modify that behavior.
Usage | Output | Description | Version | |
---|---|---|---|---|
{{:xyz}} | A bare colon is not a template modifier, it's the prefix for the main namespace. Since transclusion defaults to the Template namespace, you would use for example, {{:UTC}} (vs. {{UTC}}) to include the text of the main namespace article UTC rather than Template:UTC. | |||
{{int:xyz}} | Same as {{MediaWiki:xyz}}, except standard message translation is applied depending on subpages and content/user/uselang language. Another difference is: this doesn't appear under "このページで使用されているテンプレート:". Rendered as <xyz> if MediaWiki:xyz doesn't exist. See also Help:System message. | |||
{{msg:xyz}} | Even if there is a magic word named "xyz", use template:xyz unless the template doesn't exist (equivalent to {{template:xyz}}). Normally, magic words have priority when there is a conflict. | |||
{{msgnw:xyz}} | The unexpanded wikitext is rendered (more or less, for details see msgnw). | |||
{{raw:xyz}} | Equivalent to {{msg:xyz}} above.
|
| ||
{{subst:xyz}} | In the wikitext, the tag is substituted by the content (single-level evaluation only), see Template usage. |
Miscellaneous[編集]
Usage | Output | Description | Version | ||
---|---|---|---|---|---|
{{#language:language code}} {{#language:ar}} {{#language:language code| {{#language:ar|en}}
|
language code العربية language code Arabic |
The full name of the language for the given language code: native name (language autonym) by default, name translated in target language if a target language code is specified. Extension:CLDR must be installed for the translation to work. |
| ||
{{#special:special page name}}
|
特別:Special page name 特別:ログイン |
The localized name for the given canonical Special: page. |
| ||
{{#speciale:special page name}}
|
%E7%89%B9%E5%88%A5:Special_page_name %E7%89%B9%E5%88%A5:%E3%83%AD%E3%82%B0%E3%82%A4%E3%83%B3 |
The localized and URL-encoded name for the given canonical Special: page. |
| ||
{{#tag:tagname
|
(Depends on parser tag) | Alias for XML-style MediaWiki parser tags or extension tags. It allows execution of wiki code and Extension:ParserFunctions within tags before the tag is processed. It also prevents parsing of tags in conditional paths that aren't executed (like in #if statements). Content between tags is passed as the first parameter, and any attributes for the tags can be passed as subsequent parameters. This example:
…can be rewritten like this:
Example for the Cite extension's
テンプレート:Warning/coreYou must write |
|