Template:ACategory: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(default sort key = pagename without language prefix)
Line 1: Line 1:
<onlyinclude><includeonly>{{#if:{{{2|}}}|[[Category:{{langprefix}}{{ucfirst:{{{1}}}}}|{{{2}}}]]|[[Category:{{langprefix}}{{ucfirst:{{{1}}}}}]]}}</includeonly></onlyinclude>
<onlyinclude><includeonly>{{#if:{{langprefix}}
    |[[Category:{{langprefix}}{{ucfirst:{{{1}}}}}|{{{2|{{#titleparts:{{PAGENAME}}||2}}}}}]]
    |[[Category:{{{1}}}|{{{2|{{{1}}}}}}]]
}}</includeonly></onlyinclude>
 
<pre>Template to add category on non English pages.
<pre>Template to add category on non English pages.



Revision as of 21:53, 18 July 2024


Template to add category on non English pages.

{{ACategory|Entity|SortKey}} will on pages with prefix Zh/ become:

[[Category:Zh/Entity|SortKey]]

Note.pngNote:Don't use on English pages as it's no different than adding category the regular way. It's also safe to use in templates that will be transcluded on any pages.