Difference between pages "Help:Templates" and "Template:Languages"

From SC4D Encyclopaedia
(Difference between pages)
Jump to navigation Jump to search
sc4e>JoeST
 
sc4e>JoeST
m (added Dont delete Temp:Languages/Lang ;))
 
Line 1: Line 1:
A list of templates and reasons why you would use them, including appropriate locations, etc...
+
<includeonly><div class="LanguageLinks">
[[Category:Help]]
+
<table width="100%">
==How to Use a Template==
+
<tr valign="top" style="background: #EEF3E2">
To use a template in a document just include the code in the ''What you type'' column in the tables below. Or use the info under the Syntax heading on the template page itself. Remember to fill in all the parameters associated with the template, or it wont display properly.
+
<td style="width: 25px; padding-left: 0.5em;">[[Image:Globe.gif|40px|Languages]]</td>
 +
<td style="width: 10px; white-space: nowrap; padding: 4px 1em 0 0.5em; border-right: 1px solid #aaaaaa;">'''Languages: '''</td><td style="padding: 1px 1em 0; background: #F6F9ED;">
 +
'''[[:{{NAMESPACE}}:{{BASEPAGENAME}}|English]]'''{{Languages/Lang|language = {{{1|}}}}}{{Languages/Lang|language = {{{2|}}}}}{{Languages/Lang|language = {{{3|}}}}}{{Languages/Lang|language = {{{4|}}}}}{{Languages/Lang|language = {{{5|}}}}}{{Languages/Lang|language = {{{6|}}}}}{{Languages/Lang|language = {{{7|}}}}}{{Languages/Lang|language = {{{8|}}}}}
 +
{{Languages/Lang|language = {{{9|}}}}}{{Languages/Lang|language = {{{10|}}}}}{{Languages/Lang|language = {{{11|}}}}}{{Languages/Lang|language = {{{12|}}}}}
 +
{{Languages/Lang|language = {{{13|}}}}}{{Languages/Lang|language = {{{14|}}}}}{{Languages/Lang|language = {{{15|}}}}}{{Languages/Lang|language = {{{16|}}}}}{{Languages/Lang|language = {{{17|}}}}}{{Languages/Lang|language = {{{18|}}}}}{{Languages/Lang|language = {{{19|}}}}}</td></tr></table></div></includeonly><noinclude>
 +
== Syntax ==
 +
<pre>{{Languages|lang1|lang2|etc...}}</pre>
  
For example, to include the Language template (on a page with Dutch, French and Japanese translations):
+
* '''lang#''' (optional) - the code for one of the languages that a page has...
<pre>{{Languages|nl|fr|ja}}</pre> will look like this:
 
{{Languages|nl|fr|ja}}
 
  
==Curent Templates==
+
This template uses [[Template:Languages/Lang]]
The the sections below show all of the templates currently available on the wiki.
+
 
===Userpage Templates===
+
== Usage ==
{{main|Help:Userboxes}}
+
 
{| border="1" cellspacing="0" cellpadding="5" width=100%
+
The template should only be placed on pages that exist in more than one language, and it should be placed in the same location on each translation of the page.
! style="background:#1e90ff;"| Template Name
+
 
! style="background:#1e90ff;"| What you type
+
The English version of a page is always the main version, with all other languages as sub-pages, named using the appropriate language code (see below).
! style="background:#1e90ff;"| What you see
+
 
! style="background:#1e90ff;"| Variables
+
For example, on the Main Page you would include the text <code><nowiki>{{Languages}}</nowiki></code>, both on [[Main Page]] itself, and on each of its language sub-pages.  The template automatically creates links to any language sub-pages that exist, e.g. <tt>Main Page/ja<tt>, <tt>Main Page/fr</tt>, and ignores non-existant languages.
 +
 
 +
See [[Project:Language policy]] for further details about translating pages.
 +
 
 +
== Supported languages ==
 +
This shows you the name of each language's sub-page (using ''Main Page'' as an example). Other languages may be added easily as necessary.  Please use the appropriate [[meta:List of Wikipedias|prefix, as used on Wikipedia]] when adding a new language.  Please do ''not'' add languages for which no pages exist yet, as this will increase the time needed to include the template without adding any benefit (languages are only displayed to the user when the relevant page exists).
 +
 
 +
The link on the language names goes to the Wikipedia in that language. '''If no Wikipedia in your language exists, do not add pages in that language to MediaWiki.org!'''  This wiki is not the place for language advocacy - please go through the correct channels, and once your language has a Wikipedia then please return to add content here.
 +
 
 +
{| border="1" cellpadding="5"
 +
! Page Name || Language
 +
|-
 +
| Main Page || [[:en:|English]]
 +
|-
 +
| Main Page'''/af''' || [[:af:|Afrikaans]]
 +
|-
 +
| Main Page'''/ar''' || [[:ar:|Arabic]]
 +
|-
 +
| Main Page'''/az''' || [[:az:|Azerbaijani]]
 +
|-
 +
| Main Page'''/bcc''' || Southern Balochi
 +
|-
 +
| Main Page'''/bg''' || [[:bg:|Bulgarian]]
 +
|-
 +
| Main Page'''/br''' || [[:br:|Breton]]
 +
|-
 +
| Main Page'''/ca''' || [[:ca:|Catalan]]
 
|-
 
|-
| [[Template:SiteProfile|SiteProfile]]
+
| Main Page'''/cs''' || [[:cs:|Czech]]
| <nowiki>{{SiteProfile| site = | id = | name = }}</nowiki>
 
| Include wiki code here
 
|
 
*'''site''' - The name of the site.
 
*'''id''' - Your user ID
 
*'''name''' - (optional) can be added if you want your name to replace "My"
 
 
|-
 
|-
| [[Template:Userbox|Userbox]]
+
| Main Page'''/de''' || [[:de:|German]]
| <pre>{{Userbox
+
|-
| border-c =
+
| Main Page'''/el''' || [[:el:|Greek]]
| border-s =
+
|-
| id-c =
+
| Main Page'''/es''' || [[:es:|Spanish]]
| id-s =
+
|-
| id-fc =
+
| Main Page'''/fa''' || [[:fa:|Persian]]
| id-fs =
+
|-
| id-p =
+
| Main Page'''/fi''' || [[:fi:|Finnish]]
| id-lh =
+
|-
| info-c =
+
| Main Page'''/fr''' || [[:fr:|French]]
| info-s =
+
|-
| info-fc =
+
| Main Page'''/gu''' || [[:gu:|Gujarati]]
| info-fs =
+
|-
| info-p =
+
| Main Page'''/he''' || [[:he:|Hebrew]]
| info-lh =
+
|-
| id =
+
| Main Page'''/hu''' || [[:hu:|Hungarian]]
| info =
+
|-
}}</pre>
+
| Main Page'''/id''' || [[:id:|Indonesian]]
| {{Userbox}}
+
|-
| For details of the userbox syntax, see [[Template:Userbox| the template decription]] page.
+
| Main Page'''/it''' || [[:it:|Italian]]
|}
+
|-
 
+
| Main Page'''/ja''' || [[:ja:|Japanese]]
===Infobox Templates===
+
|-
{| border="1" cellspacing="0" cellpadding="5" width=100%
+
| Main Page'''/ko''' || [[:ko:|Korean]]
! style="background:#1e90ff;"| Template Name
+
|-
! style="background:#1e90ff;"| What you type
+
| Main Page'''/ksh''' || [[:ksh:|Kölsch]]
! style="background:#1e90ff;"| What you see
+
|-
! style="background:#1e90ff;"| Variables
+
| Main Page'''/mr''' || [[:mr:|Marathi]]
 +
|-
 +
| Main Page'''/ms''' || [[:ms:|Malay]]
 +
|-
 +
| Main Page'''/nl''' || [[:nl:|Nederlands]]
 +
|-
 +
| Main Page'''/no''' || [[:no:|Norwegian]]
 +
|-
 +
| Main Page'''/oc''' || [[:oc:|Occitan]]
 +
|-
 +
| Main Page'''/pl''' || [[:pl:|Polish]]
 +
|-
 +
| Main Page'''/pt''' || [[:pt:|Portugese]]
 +
|-
 +
| Main Page'''/ro''' || [[:ro:|Romanian]]
 +
|-
 +
| Main Page'''/ru''' || [[:ru:|Russian]]
 +
|-
 +
| Main Page'''/si''' || [[:si:|Sinhalese]]
 +
|-
 +
| Main Page'''/sq''' || [[:sq:|Albanian]]
 +
|-
 +
| Main Page'''/sr''' || [[:sr:|Serbian]]
 +
|-
 +
| Main Page'''/sv''' || [[:sv:|Swedish]]
 +
|-
 +
| Main Page'''/th''' || [[:th:|Thai]]
 +
|-
 +
| Main Page'''/tr''' || [[:tr:|Turkish]]
 +
|-
 +
| Main Page'''/uk''' || [[:uk:|Ukrainian]]
 
|-
 
|-
| [[Template:infobox TGI|Infobox TGI]]
+
| Main Page'''/vi''' || [[:vi:|Vietnamese]]
| <pre>{{Infobox TGI
 
| name =
 
| format =
 
| type =
 
| group =
 
| instance =
 
| comments = }}</pre>
 
| See [[Template:Infobox_TGI#Example| the template description]] for details
 
|
 
*'''name''' - The name of the TGI.
 
*'''format''' -
 
*'''type''' - The Type ID of the object, defines what file type the file is (?)
 
*'''group''' - The Group ID of the object
 
*'''instance''' - The Instance ID of the object
 
*'''comments''' (optional) - Any comments on the TGI.
 
 
|-
 
|-
| [[Template:infobox lot|Infobox lot]]
+
| Main Page'''/yue''' || [[:zh-yue:|Cantonese]]
| <pre>{{infobox lot
 
|type =
 
|image1 =
 
|image2 =
 
|desc =
 
|credits =
 
|support =
 
|download-site =
 
|download-id =
 
}}</pre>
 
| See [[Template:Infobox_lot#Example| the template description]] for details
 
|
 
*'''type''' - the type of lot it is (either plop or grow).
 
*'''image1''' - an example image.
 
*'''image2''' - another example image.
 
*'''desc''' - the lot description (readme)
 
*'''credits''' - any credits
 
*'''supports''' - any supporting acts
 
*'''download-site''' - the download site
 
*'''download-id''' - the download lot id
 
 
|-
 
|-
| [[Template:infobox grow|Infobox grow]]
+
| Main Page'''/zh''' || [[:zh:|Chinese]]
| <pre>{{infobox grow
 
|download-site =
 
|download-id =
 
|image1 =
 
|image2 =
 
|desc =
 
|credits =
 
|support =
 
|size =
 
|style =
 
|type =
 
|stage =
 
|occupants =
 
|worth =
 
|bulldoze-cost =
 
|construction-time =
 
|fire =
 
|power =
 
|water =
 
|air-mag =
 
|air-spr =
 
|water-mag =
 
|water-spr =
 
|garbage-mag =
 
|garbage-spr =
 
|depend =
 
}}</pre>
 
| See [[Template:Infobox_grow#Example| the template description]] for details
 
|
 
*''image1'', ''image2'', ''desc'', ''credits'', ''support'', ''download-site'', ''download-id'' - See [[Template:Infobox_lot]] for details.
 
*'''size''' ([a]x[b]) -  Lot size a tiles long by b tiles wide.
 
*'''type''' - The type of lot Residential, Commercial, Industrial, Agricultural
 
*'''style''' -  The [[Tileset]] the lot grows under
 
*'''stage''' - The [[Growth Stage]] of the lot.
 
*'''occupants''' - The maximum number of Sims that can live/work in the LOT
 
*'''worth''' -
 
*'''bulldoze-cost''' - The number of Simoleons (without the § sign as that is already there) the building costs to demolish.
 
*'''construction-time''' - The time it takes for the lot to be constructed
 
*'''fire''' - The maximum fire stage, if the lot reaches this stage in a fire it will be destroyed.
 
*'''power''' - The amount of electrical power consumed by the lot, in MWh/month.
 
*'''water''' - The amount of water consumed by the lot, in Gallons/month.
 
*'''air-mag''' - The magnitued of Air Pollution over '''air-spr''' tiles.
 
*'''water-mag''' - The magnitude of Water Pollution over '''water-spr''' tiles.
 
*'''garbage-mag''' - The magnitude of Garbage Pollution over '''garbage-spr''' tiles.
 
*'''depend - Any dependencies that are needed for this lot to work.
 
 
|-
 
|-
| [[Template:infobox plop|Infobox plop]]
+
| Main Page'''/zh-hans''' || Chinese (Simplified)
| <pre>{{infobox plop
 
|download-site =
 
|download-id =
 
|image1 =
 
|image2 =
 
|desc =
 
|credits =
 
|support =
 
|size =
 
|menu =
 
|jobs =
 
|plop-cost =
 
|monthly-cost =
 
|bulldoze-cost =
 
|park-mag =
 
|park-spr =
 
|landmark-mag =
 
|landmark-spr =
 
|fire =
 
|power =
 
|water =
 
|air-mag =
 
|air-spr =
 
|water-mag =
 
|water-spr =
 
|garbage-mag =
 
|garbage-spr =
 
|depend =
 
}}</pre>
 
| See [[Template:Infobox_plop#Example| the template description]] for details
 
|
 
*''image1'', ''image2'', ''desc'', ''credits'', ''support'', ''download-site'', ''download-id'' - See [[Template:Infobox_lot]] for details.
 
*'''size''' ([a]x[b]) -  Lot size a tiles long by b tiles wide.
 
*'''menu''' - The menu the lot resides in.
 
*'''jobs''' - The number of jobs the lot supplies (can be formatted with $'s if the lot supplies multiple wealth jobs).
 
*'''plop-cost''' - The number of Simoleons (without the § sign as that is already there) the building costs to build.
 
*'''bulldoze-cost''' - The number of Simoleons (without the § sign as that is already there) the building costs to demolish.
 
*'''park-mag''' - The magnitude of Park Effect over '''park-spr''' tiles.
 
*'''landmark-mag''' - The magnitude of Landmark Effect over '''landmark-spr''' tiles.
 
*'''fire''' - The maximum fire stage, if the lot reaches this stage in a fire it will be destroyed.
 
*'''power''' - The amount of electrical power consumed by the lot, in MWh/month.
 
*'''water''' - The amount of water consumed by the lot, in Gallons/month.
 
*'''air-mag''' - The magnitued of Air Pollution over '''air-spr''' tiles.
 
*'''water-mag''' - The magnitude of Water Pollution over '''water-spr''' tiles.
 
*'''garbage-mag''' - The magnitude of Garbage Pollution over '''garbage-spr''' tiles.
 
*'''depend - Any dependencies that are needed for this lot to work.
 
|}
 
 
 
===Request/Marking Templates===
 
{{main|Help:Marking Articles}}
 
{{Help:Marking Articles}}
 
 
 
===Language Templates===
 
{| border="1" cellspacing="0" cellpadding="5"
 
! style="background:#1e90ff;"| Template Name
 
! style="background:#1e90ff;"| What you type
 
! style="background:#1e90ff;"| What you see
 
! style="background:#1e90ff;"| Variables
 
 
|-
 
|-
| [[Template:Languages|Language Bar]]
+
| Main Page'''/zh-hant''' || Chinese (Traditional)
| <pre>{{languages
 
|lang1
 
|lang2
 
|lang3
 
|lang4
 
...
 
|lang19
 
}}</pre>
 
| width="60%"| {{languages|de|fr|ja|zh}}
 
| *'''lang''' (multiple, optional) - the 2 character code of the languages where a translation of this page is available. '''The code for English (en) does not need to be inlcuded, its presence is assumed by the template.'''
 
 
|}
 
|}
  
===Other Templates===
+
== Example ==
*[[Template:Download| Download]]
+
Here is how the language bar looks on a page with French and Japanese translations:
*[[Template:Main| Main]]
+
{{Languages|fr|ja}}
 
+
</noinclude>
==How to Make a Template==
 

Revision as of 05:10, 30 July 2008

Syntax

{{Languages|lang1|lang2|etc...}}
  • lang# (optional) - the code for one of the languages that a page has...

This template uses Template:Languages/Lang

Usage

The template should only be placed on pages that exist in more than one language, and it should be placed in the same location on each translation of the page.

The English version of a page is always the main version, with all other languages as sub-pages, named using the appropriate language code (see below).

For example, on the Main Page you would include the text {{Languages}}, both on Main Page itself, and on each of its language sub-pages. The template automatically creates links to any language sub-pages that exist, e.g. Main Page/ja, Main Page/fr, and ignores non-existant languages.

See Project:Language policy for further details about translating pages.

Supported languages

This shows you the name of each language's sub-page (using Main Page as an example). Other languages may be added easily as necessary. Please use the appropriate prefix, as used on Wikipedia when adding a new language. Please do not add languages for which no pages exist yet, as this will increase the time needed to include the template without adding any benefit (languages are only displayed to the user when the relevant page exists).

The link on the language names goes to the Wikipedia in that language. If no Wikipedia in your language exists, do not add pages in that language to MediaWiki.org! This wiki is not the place for language advocacy - please go through the correct channels, and once your language has a Wikipedia then please return to add content here.

Page Name Language
Main Page English
Main Page/af Afrikaans
Main Page/ar Arabic
Main Page/az Azerbaijani
Main Page/bcc Southern Balochi
Main Page/bg Bulgarian
Main Page/br Breton
Main Page/ca Catalan
Main Page/cs Czech
Main Page/de German
Main Page/el Greek
Main Page/es Spanish
Main Page/fa Persian
Main Page/fi Finnish
Main Page/fr French
Main Page/gu Gujarati
Main Page/he Hebrew
Main Page/hu Hungarian
Main Page/id Indonesian
Main Page/it Italian
Main Page/ja Japanese
Main Page/ko Korean
Main Page/ksh Kölsch
Main Page/mr Marathi
Main Page/ms Malay
Main Page/nl Nederlands
Main Page/no Norwegian
Main Page/oc Occitan
Main Page/pl Polish
Main Page/pt Portugese
Main Page/ro Romanian
Main Page/ru Russian
Main Page/si Sinhalese
Main Page/sq Albanian
Main Page/sr Serbian
Main Page/sv Swedish
Main Page/th Thai
Main Page/tr Turkish
Main Page/uk Ukrainian
Main Page/vi Vietnamese
Main Page/yue Cantonese
Main Page/zh Chinese
Main Page/zh-hans Chinese (Simplified)
Main Page/zh-hant Chinese (Traditional)

Example

Here is how the language bar looks on a page with French and Japanese translations: