Template:ACategory: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<onlyinclude><includeonly>{{#if:{{{2|}}}|[[Category:{{ROOTPAGENAME}}/{{ucfirst:{{{1}}}}}|{{{2}}}]]|[[Category:{{ROOTPAGENAME}}/{{ucfirst:{{{1}}}}}]]}}</includeonly></onlyinclude>
<onlyinclude><includeonly>{{#if:{{{2|}}}|[[Category:{{langprefix}}{{ucfirst:{{{1}}}}}|{{{2}}}]]|[[Category:{{langprefix}}{{ucfirst:{{{1}}}}}]]}}</includeonly></onlyinclude>
<pre>Template to add category on non English pages.
<pre>Template to add category on non English pages.


Line 7: Line 7:


</pre>
</pre>
{{important|Don't use on English pages}}
{{note|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.}}


[[Category:Language-related templates]]
[[Category:Language-related templates]]

Revision as of 03:27, 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.