Templat:NZ population data/doc: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
k Robot: Perubahan kosmetika
Taylorbot (bicara | kontrib)
per BPA : sintaks <br> dan <code> | t=5'376 su=793 in=1'045 at=809 -- only 336 edits left of totally 1'130 possible edits | edr=000-0010(!!!) ovr=010-1111 aft=000-0010
 
(Satu revisi perantara oleh satu pengguna lainnya tidak ditampilkan)
Baris 3:
 
==== Adding to an article ====
<ttcode><nowiki>{{NZ population data|Example city|y|y|y}}</nowiki></ttcode>
 
The template has seven parameters:
Baris 9:
# showpopulation = display the population figure
# showtitle = display the title (e.g. "June 2008 estimate")
# showref = display the reference, can be reused by adding: <ttcode><nowiki><ref name="NZ_population_data"/></nowiki></ttcode>
# titlepre = free text before the title, for example to add parentheses
# titlepost = free text after the title
# aucklandref = For the new Auckland Council and the altered Waikato District, displays a reference to the new population figures, can be reused by adding: <ttcode><nowiki><ref name="Auckland_population_data"/></nowiki></ttcode>
Leaving a show parameter empty results in that value being hidden.
 
The template data uses formatted text numbers, with the comma thousands separator, which is suitable for the majority of uses. For the numerical value, for example to use in {{tl|Infobox Settlement}}, use the formula: <ttcode><nowiki>{{formatnum:{{NZ population data| ##Example city## |y}}|R}}</nowiki></ttcode>
 
==== Automatically updating formulae ====
*Population density: <ttcode><nowiki>{{Decimals|{{formatnum:{{NZ population data| ##Example city## |y}}|R}}/ ##numerical land area## |1}}</nowiki></ttcode>
*Percent of national population: <ttcode><nowiki>{{Decimals|{{formatnum:{{NZ population data| ##Example city## |y}}|R}}/{{formatnum:{{NZ population data|New Zealand|y}}|R}}*100|1}}</nowiki></ttcode>
 
<includeonly>
Baris 29:
[[zh:Template:NZ population data]]
</includeonly>
<noinclude>
 
[[Kategori:Dokumentasi templat]]
 
</noinclude>