ਫਰਮਾ:Langcat
Usage
[ਸੋਧੋ]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 page, to be included in the translatable page layout:
[[Category:MediaWiki Introduction{{Langcat|Communication}}]] [[Category:MediaWiki Communication{{Langcat|Communication}}]]
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.
See Page translation administration for general markup instructions.
Implementation note
[ਸੋਧੋ]{{PAGENAME}}
used without parameter to get the current page reencodes some characters (such as the ASCII apostrophe-quote '
, double quote "
and amprsand &
) using HTML numeric decimal entities (for example any apostrophe in the title will be returned as '
).
So if the title of the current page contains an apostrophe, {{PAGENAME}}
will not return a single apostrophe, and it will not match the given parameter 1 in {{#switch:...}}
.
To get comparable results, the parameter 1 is then reencoded in this template through {{PAGENAME:{{{1}}}}}
so that it becomes comparable in ParserFunctions like {{#switch:...}}
or {{#ifeq:...}}
with the current pagename as returned by {{PAGENAME}}
alone.