「テンプレート:Langcat」の版間の差分

提供: ひつじ小屋別館2代目
移動先: 案内検索
(1版)
(11 revisions from meta:Template:Langcat)
1行目: 1行目:
<includeonly>{{#switch: {{PAGENAME}} | {{{1}}} |{{{1}}}/en =|#default=/{{#titleparts: {{PAGENAME}} | | -1 }} }}</includeonly><noinclude>
+
<includeonly>{{#switch: {{PAGENAME}}
This template can be used to add the page to the relevant language category: it's appended to the category name and adds either nothing on the English page, or the language code on the translated pages; it needs the source page title (without namespace) as parameter. Example for the [[Communication|Communication]] page, to be included in the translatable page layout:
+
| {{PAGENAME:{{{1}}}}} =
<pre>
+
| #default = {{#switch: {{#titleparts:{{PAGENAME}}||-1}}
<nowiki>[[</nowiki>Category:MediaWiki Introduction{{Langcat|Communication}}]]
+
  | | doc | layout | sandbox | testcases =
<nowiki>[[</nowiki>Category:MediaWiki Communication{{Langcat|Communication}}]]
+
  | #default = /{{#titleparts:{{PAGENAME}}||-1}}
</pre>
+
  }}
The template adds /en subpages to the /en categories to avoid double listing in the English (main) categories, although those categories will be mostly red links here on MediaWiki.org.
+
}}</includeonly><noinclude>{{Documentation}}</noinclude>
 
 
See [[Special:MyLanguage/Help:Extension:Translate/Page_translation_administration|Page translation administration]] for general markup instructions.
 
 
 
[[Category:Internationalization templates]]</noinclude>
 

2014年6月24日 (火) 18:13時点における版

Documentation icon Template documentation[create]