• Home
  • Random
  • Log in
  • Settings
  • About English Wikipedia @ Freddythechick
English Wikipedia @ Freddythechick

Template:Swiss populations/sandbox

  • Language
  • Watch
  • View source
< Template:Swiss populations
__EXPECTUNUSEDTEMPLATE__This is the template sandbox page for Template:Swiss populations (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 2,400 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.

This template displays the municipal or district population from Swiss population data.

Contents

  • 1 Usage
  • 2 Parameters
  • 3 Example
  • 4 See also

Usage

The template uses the following syntax <syntaxhighlight lang="wikitext">Template:Swiss populations data ISO code</syntaxhighlight>

Parameters

  • ISO code is the ISO code for Switzerland followed by a "-" and the ISO code for the Canton eg. CH-BE would be for any municipality in the Canton of Bern. For a list of the 26 cantons, see List of Swiss Cantons.
  • SFOS number is the Community Identification Number for each municipality. It is found in the individual municipality's infobox. ex. 0351 is the code for Bern. Larger political organizations also have a SFOS number, for example B0246 is the number for the Bern-Mittelland administrative district.

Example

<syntaxhighlight lang="wikitext"> 4,626 </syntaxhighlight> returns 4,626

which is the population in Aarberg.



While an incorrect SFOS number (for example: Oberönz formerly a municipality, now a village in Herzogenbuchsee) <syntaxhighlight lang="wikitext"> Incorrect Municipal Code 1 0,984 </syntaxhighlight> returns Incorrect Municipal Code 1 0,984

and logs the failure to Category:Template:Swiss populations data/Failure

See also

  • Template:Swiss populations ref provides the reference for the population
  • Template:Swiss populations date provides the date that the population was recorded
  • Template:Swiss populations YM returns only the year and month
  • Template:Swiss populations Y returns only the year
  • Template:Swiss populations NC provides the population without any formatting, for use in headers
  • Template:Swiss populations sub provides a sub-total population for sub-districts
The above documentation is transcluded from Template:Swiss populations/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.


Retrieved from "https://enwiki.freddythechick.net/index.php?title=Template:Swiss_populations/sandbox&oldid=4424434"
Last edited on 29 August 2019, at 15:29

Languages

      This page is not available in other languages.

      English Wikipedia @ Freddythechick
      • This page was last edited on 29 August 2019, at 15:29.
      • Content is available under Creative Commons Attribution-ShareAlike 4.0 unless otherwise noted.
      • About English Wikipedia @ Freddythechick
      • Desktop