Difference between revisions of "Kerbal Space Program Wiki:Templates"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "{{Stub}} == Data templates == Templates with most of it data which doesn't need to be translated can use a special system of storing the values in another template itself. Th...")
 
m (+link Kerbol/Data;)
Line 4: Line 4:
 
Templates with most of it data which doesn't need to be translated can use a special system of storing the values in another template itself. This helps other languages to reuse these values directly and is used by all celestial objects with {{Tl|Planetbox}}. Because every article can be included via templates it is possible to add an article other articles. Templates which are in the [[:Category:Translating Templates]] could be used for this method. It uses a subpage of the article in which the content/values are stored and the article with all the translation then imports this subpage.
 
Templates with most of it data which doesn't need to be translated can use a special system of storing the values in another template itself. This helps other languages to reuse these values directly and is used by all celestial objects with {{Tl|Planetbox}}. Because every article can be included via templates it is possible to add an article other articles. Templates which are in the [[:Category:Translating Templates]] could be used for this method. It uses a subpage of the article in which the content/values are stored and the article with all the translation then imports this subpage.
  
For example he <nowiki>{{Planetbox}}</nowiki> template suggests to use <tt>/Data</tt> subpage which only holds the template contents which is then imported. So there is a [[Kerbol/Data]] article which only has the planet box values and [[Kerbol]] (also the different languages like [[Kerbol/sv]] or [[Kerbol/de]]) then imports this with <nowiki>{{:Duna/Data}}</nowiki>. The colon before the article's name is important, as without it, it would assume a template (<nowiki>{{Duna/Data}}</nowiki> would import <tt>Template:Duna/Data</tt>) and this would separate the specific values form the article.
+
For example he <nowiki>{{Planetbox}}</nowiki> template suggests to use <tt>/Data</tt> subpage which only holds the template contents which is then imported. So there is a [[Kerbol/Data]] article which only has the planet box values and [[Kerbol]] (also the different languages like [[Kerbol/sv]] or [[Kerbol/de]]) then imports this with {{[[Kerbol/Data|:Kerbol/Data]]}}. The colon before the article's name is important, as without it, the software would assume a template (<nowiki>{{Kerbol/Data}}</nowiki> would import <tt>Template:Duna/Data</tt>) and this would separate the specific values form the article.
  
 
If a template support this feature, it should use {{Tl|Data Template}} which automatically categorise the article and add a little help for all the users.
 
If a template support this feature, it should use {{Tl|Data Template}} which automatically categorise the article and add a little help for all the users.

Revision as of 21:13, 1 May 2013

This article is a stub. You can help KSP Wiki by expanding it.

Data templates

Templates with most of it data which doesn't need to be translated can use a special system of storing the values in another template itself. This helps other languages to reuse these values directly and is used by all celestial objects with {{Planetbox}}. Because every article can be included via templates it is possible to add an article other articles. Templates which are in the Category:Translating Templates could be used for this method. It uses a subpage of the article in which the content/values are stored and the article with all the translation then imports this subpage.

For example he {{Planetbox}} template suggests to use /Data subpage which only holds the template contents which is then imported. So there is a Kerbol/Data article which only has the planet box values and Kerbol (also the different languages like Kerbol/sv or Kerbol/de) then imports this with {{:Kerbol/Data}}. The colon before the article's name is important, as without it, the software would assume a template ({{Kerbol/Data}} would import Template:Duna/Data) and this would separate the specific values form the article.

If a template support this feature, it should use {{Data Template}} which automatically categorise the article and add a little help for all the users.