13,208
edits
m (→Category suppression: Style) |
(→Translating templates: Clarification; one more example; Template:Note; Some rephrasing) |
||
Line 177: | Line 177: | ||
== Translating templates == | == Translating templates == | ||
Templates are translated in a different way than [[Help:Translate|normal articles]]. Instead of creating another page for each translation, all translations are written within one template. To do that one can use the {{tl|LangSwitch}} template, for example like below. | |||
<nowiki>[http://{{LangSwitch | |||
| en = <!-- English --> | |||
en | |||
| de = <!-- German --> | |||
de | |||
| fr = <!-- French --> | |||
fr | |||
}}.wikipedia.org Wikipedia]</nowiki> | |||
<nowiki>{{LangSwitch | <nowiki>{{LangSwitch | ||
Line 188: | Line 197: | ||
}}</nowiki> | }}</nowiki> | ||
{{note|Many templates use tables and have to start from the beginning of the line, like in the above example.}} | |||
{{note|Inserting blank lines or spaces will usually cause unintended changes to the way the template are rendered.}} | |||
The {{tl|LangSwitch}} template uses the two letter language code present in all but the English page titles. If none of the languages that have been translated to is found, a template have not yet been translated to that language and the English text will be used instead, provided it is available. | The {{tl|LangSwitch}} template uses the two letter language code present in all but the English page titles. If none of the languages that have been translated to is found, a template have not yet been translated to that language and the English text will be used instead, provided it is available. |