Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Autotranslate/doc: Difference between revisions

Template page
m Reverted edits by Mike.lifeguard (talk) to last revision by Alno
More text
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
This template is used to show a template in the users interface language.
== How to convert a template ==
Before you apply this template, first you have to prepare the template.
=== Pick a template ===
First you have to pick a template to autotranslate. See [[User:Multichill/Template i18n]] for a list.
=== Create a layout template ===
If the template is not to difficult you should create a layout template to contain the layout of all language versions of the template. See for example [[Cc-by-1.0/layout]].
This template should not add any categories when transluded.
=== Create a documentation page ===
First create a documentation page at ''template name''/doc. This documentation page should include some code for creating language versions of the template. See for example [[Template:Cc-by-1.0/doc]]
=== Convert existing language versions ===
Each language version of the template should be checked and converted to use the layout template.
=== Convert the main template ===
The last step is to enable the template. Be sure to check everything before you enable the template. You can cause a really big mess!
To enable the template, put this code in the template for the layout part:
<nowiki>{{Autotranslate|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|base=</nowiki>''template name''<nowiki>}}</nowiki>
See for example [[Template:Cc-by-1.0]]
=== Protect templates ===
The main template page is probably already protected. You should probably also protect /layout, /lang & /en.
== Code snippet ==
To use this template, include the following code:
To use this template, include the following code:



Revision as of 20:44, 11 December 2008

This template is used to show a template in the users interface language.

How to convert a template

Before you apply this template, first you have to prepare the template.

Pick a template

First you have to pick a template to autotranslate. See User:Multichill/Template i18n for a list.

Create a layout template

If the template is not to difficult you should create a layout template to contain the layout of all language versions of the template. See for example Cc-by-1.0/layout. This template should not add any categories when transluded.

Create a documentation page

First create a documentation page at template name/doc. This documentation page should include some code for creating language versions of the template. See for example Template:Cc-by-1.0/doc

Convert existing language versions

Each language version of the template should be checked and converted to use the layout template.

Convert the main template

The last step is to enable the template. Be sure to check everything before you enable the template. You can cause a really big mess! To enable the template, put this code in the template for the layout part: {{Autotranslate|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|base=template name}} See for example Template:Cc-by-1.0

Protect templates

The main template page is probably already protected. You should probably also protect /layout, /lang & /en.

Code snippet

To use this template, include the following code:

{{Autotranslate|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|4={{{4|}}}|5={{{5|}}}|6={{{6|}}}|base={{subst:PAGENAME}}}}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.