Lompat ke isi

Templat:NZ population data/doc: Perbedaan antara revisi

Dari Wikipedia bahasa Indonesia, ensiklopedia bebas
Konten dihapus Konten ditambahkan
MerlIwBot (bicara | kontrib)
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
 
(3 revisi perantara oleh 3 pengguna tidak ditampilkan)
Baris 3: Baris 3:


==== Adding to an article ====
==== Adding to an article ====
<tt><nowiki>{{NZ population data|Example city|y|y|y}}</nowiki></tt>
<code><nowiki>{{NZ population data|Example city|y|y|y}}</nowiki></code>


The template has seven parameters:
The template has seven parameters:
Baris 9: Baris 9:
# showpopulation = display the population figure
# showpopulation = display the population figure
# showtitle = display the title (e.g. "June 2008 estimate")
# showtitle = display the title (e.g. "June 2008 estimate")
# showref = display the reference, can be reused by adding: <tt><nowiki><ref name="NZ_population_data"/></nowiki></tt>
# showref = display the reference, can be reused by adding: <code><nowiki><ref name="NZ_population_data"/></nowiki></code>
# titlepre = free text before the title, for example to add parentheses
# titlepre = free text before the title, for example to add parentheses
# titlepost = free text after the title
# 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: <tt><nowiki><ref name="Auckland_population_data"/></nowiki></tt>
# aucklandref = For the new Auckland Council and the altered Waikato District, displays a reference to the new population figures, can be reused by adding: <code><nowiki><ref name="Auckland_population_data"/></nowiki></code>
Leaving a show parameter empty results in that value being hidden.
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: <tt><nowiki>{{formatnum:{{NZ population data| ##Example city## |y}}|R}}</nowiki></tt>
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: <code><nowiki>{{formatnum:{{NZ population data| ##Example city## |y}}|R}}</nowiki></code>


====Automatically updating formulae====
==== Automatically updating formulae ====
*Population density: <tt><nowiki>{{Decimals|{{formatnum:{{NZ population data| ##Example city## |y}}|R}}/ ##numerical land area## |1}}</nowiki></tt>
*Population density: <code><nowiki>{{Decimals|{{formatnum:{{NZ population data| ##Example city## |y}}|R}}/ ##numerical land area## |1}}</nowiki></code>
*Percent of national population: <tt><nowiki>{{Decimals|{{formatnum:{{NZ population data| ##Example city## |y}}|R}}/{{formatnum:{{NZ population data|New Zealand|y}}|R}}*100|1}}</nowiki></tt>
*Percent of national population: <code><nowiki>{{Decimals|{{formatnum:{{NZ population data| ##Example city## |y}}|R}}/{{formatnum:{{NZ population data|New Zealand|y}}|R}}*100|1}}</nowiki></code>


<includeonly>
<includeonly>
[[bn:টেমপ্লেট:NZ population data]]
[[cy:Nodyn:NZ population data]]
[[cy:Nodyn:NZ population data]]
[[en:Template:NZ population data]]
[[en:Template:NZ population data]]
Baris 28: Baris 29:
[[zh:Template:NZ population data]]
[[zh:Template:NZ population data]]
</includeonly>
</includeonly>
<noinclude>

[[Kategori:Dokumentasi templat]]

</noinclude>

Revisi terkini sejak 22 April 2022 22.23

Usage[sunting sumber]

This template is to supply uniform, up-to-date population data to New Zealand articles. It facilitates a mass update of all the population numbers in articles.

Adding to an article[sunting sumber]

{{NZ population data|Example city|y|y|y}}

The template has seven parameters:

  1. area = Statistics NZ name of area for population (e.g. Auckland City), defaults to pagename.
  2. showpopulation = display the population figure
  3. showtitle = display the title (e.g. "June 2008 estimate")
  4. showref = display the reference, can be reused by adding: <ref name="NZ_population_data"/>
  5. titlepre = free text before the title, for example to add parentheses
  6. titlepost = free text after the title
  7. aucklandref = For the new Auckland Council and the altered Waikato District, displays a reference to the new population figures, can be reused by adding: <ref name="Auckland_population_data"/>

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 {{Infobox Settlement}}, use the formula: {{formatnum:{{NZ population data| ##Example city## |y}}|R}}

Automatically updating formulae[sunting sumber]

  • Population density: {{Decimals|{{formatnum:{{NZ population data| ##Example city## |y}}|R}}/ ##numerical land area## |1}}
  • Percent of national population: {{Decimals|{{formatnum:{{NZ population data| ##Example city## |y}}|R}}/{{formatnum:{{NZ population data|New Zealand|y}}|R}}*100|1}}