This is an archive copy of wikilivres.ca as of 18 February 2017 (from the WikiTeam dump). The original site is closed.

Template:Namespace: Difference between revisions

Free texts and images.
Jump to navigation Jump to search
imported>Rocket000
+
imported>Yann
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#switch:{{NAMESPACE}}
{{#switch:{{NAMESPACE:{{{1|{{FULLPAGENAME}}}}}}}
| {{ns:0}}=gallery
| {{ns:0}}=gallery
| {{ns:2}}=user page
| {{ns:2}}=user page
Line 9: Line 9:
| {{TALKSPACE}}=talk page
| {{TALKSPACE}}=talk page
| page}}<noinclude>
| page}}<noinclude>
 
{{documentation}}
 
----
This works similar to the [[m:Help:Magic words|magic word]] <nowiki>{{NAMESPACE}}</nowiki>, which returns the name of whatever namespace it's on (hence it says 'template' right now). All this does is assign new names to those values to make them a little easier to use in template messages.
 
 
This table compares the magic word to this template showing what each would display if in those namespaces.
{|class="wikitable" style="text-align:center;"
! Location !! <nowiki>{{NAMESPACE}}</nowiki> !! <nowiki>{{namespace}}</nowiki>
|-
| Main space || {{ns:0}}(nothing) || gallery
|-
| Commons: pages || {{ns:4}} || project page
|-
| File: pages || {{ns:6}} || media file
|-
| User: pages || {{ns:2}} || user page
|-
| Categories || {{ns:14}} || category
|-
| Templates || {{ns:10}} || template
|-
| System messages || {{ns:8}} || system message
|-
| '''Any''' talk page || {{ns:1}}, {{ns:3}}, {{ns:5}}, {{ns:7}}... || talk page
|}
All other pages are rendered as "page".
 
'''See also:''' {{tl|namespaces}} - for when a plural form is needed.
 
==Note on localization==
As templates like these are used directly within translations themselves, it would not make sense to have this autotranslate (the messages they are used in should be). Thus, when creating localized versions, you may use any names that are appropriate in your language (but please link them or categorize them with this template to help translators find them).  In some languages, it may be appropriate to create additional/alternative forms of these functional templates. For example, {{tl|namespace/fi}}, {{tl|namespacepar/fi}}, and {{tl|namespacepluralgen/fi}} instead of the two in English.


[[Category:Function templates|{{PAGENAME}}]]
[[Category:Function templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Latest revision as of 22:35, 13 November 2011

template

Documentation


Template:Namespace/documentation