Anonymous user
Template:Languages/doc: Difference between revisions
m
corrected "categories" to "categorizes"
Richardpruen (talk | contribs) m (1 revision imported) |
imported>Bellabellab m (corrected "categories" to "categorizes") |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | |||
== Usage == | |||
=== General === | |||
This template is to be placed in template documentation of user languages. It is intended primarily for [[Wikipedia:Userboxes|userboxes]] (such as {{Tl|User en-ca-1}}), and it should {{Em|not}} be placed on mainspace articles. It is written as (example for English): | |||
<nowiki>{{Languages|English|en}}</nowiki> | |||
You write only ''English'' (not ''language'': the template writes that by itself). | |||
=== Language void === | |||
For most languages, saying "language" after it is necessary to direct it straight to the language's mainspace page, but sometimes saying "language" directs it to a red link. To stop this problem put: | |||
<nowiki>{{Languages|English|en|langvoid=}}</nowiki> | |||
=== User space === | |||
Most language userboxes are in the template namespace. For those in user space, add the {{Para|userspace|yes}} parameter: | |||
<nowiki>{{Languages|Southern American English|UBX/SoE|userspace=yes}}</nowiki> | |||
=== Different category === | |||
This template automatically puts the template in its User template category, to redirect to a different User templates category do this, using Scottish English as an example: | |||
<nowiki>{{Languages|Scottish English|en-sco|catalt=en}}</nowiki> | |||
=== Category sections === | |||
By default the template categorizes templates like: | |||
1<br> | |||
[[Template:User en-1]] | |||
2<br> | |||
[[Template:User en-2]] | |||
And so on, but if you wanted to replace these with different abbreviations such as: | |||
c<br> | |||
[[Template:User en-ca-1]]<br> | |||
[[Template:User en-ca-2]]<br> | |||
e<br> | |||
[[Template:User en-1]]<br> | |||
[[Template:User en-2]]<br> | |||
Add <nowiki>|sections=</nowiki> with the abbreviated code, such as "ca" or "en", etc. Do {{Em|not}} place the "-", at the end of "sections" as was done previously, this will mess up the sorting. | |||
<!-- | |||
=== # === | |||
This template automatically categorizes templates by number by default, but for some reason the parser functions do not work exactly right when using the "sections" option, as such the number override has to be used. | |||
<nowiki>{{Languages|English|en|level=6|sections=en-|#=N}}</nowiki> | |||
--> | |||
=== | ===Voiding the category=== | ||
Some templates, such as the [[Template:User blank|blank]] series and other fictional languages, do not need to have their own category. To void the category completely, use this [[wikitext]] [[Wikipedia:Wiki markup |markup text]]: | |||
= | <code><nowiki>{{Languages|Spoken|blank|catvoid=}}</nowiki></code> | ||
=== Format === | |||
If all of these functions were used on one template they would look like this: | |||
<nowiki>{{Languages|English|en|langvoid=|catvoid=|catalt=en|sections=us|#=N}}</nowiki> | |||
Please note catalt, sections and # cannot exist if catvoid exists. | |||
== | ==See also== | ||
* {{tl|Complang}} | |||
* {{tl|Language table}} | |||
<includeonly>{{Sandbox other|| | |||
<!-- PLEASE ADD CATEGORIES BELOW THIS LINE, THANKS. --> | |||
[[Category:Language user templates| ]] | |||
< | <!-- PLEASE ADD INTERWIKIS BELOW THIS LINE, THANKS. --> | ||
}}</includeonly> | |||
</includeonly> |