This is the template sandbox page for Template:Swiss populations (diff). See also the companion subpage for test cases. |
This 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.
Preview message: Transclusion count updated automatically (see documentation). |
This template displays the municipal or district population from Swiss population data.
The template uses the following syntax
{{Swiss populations|ISO code|SFOS number}}
CH-BE
would be for any municipality in the Canton of Bern. For a list of the 26 cantons, see List of Swiss Cantons.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.{{Swiss populations|CH-BE|0301}}
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)
{{Swiss populations|CH-BE|0984}}
returns Incorrect Municipal Code 1 0,984
and logs the failure to Category:Template:Swiss populations data/Failure