|
|
Zeile 1: |
Zeile 1: |
| <noinclude>{{Dokumentation/Dokuseite}}</noinclude> | | <onlyinclude>{{Babel field |
| {{Achtung|Diese Vorlage soll nur in anderen Vorlagen und nicht direkt in Artikeln oder Tabellen verwendet werden. In Artikeln oder Tabellen bitte für das deutsche Zahlenformat die MediaWiki-Standardfunktion [[Hilfe:Parserfunktionen/Zahlen#formatnum|<nowiki>{{ZAHLENFORMAT}}</nowiki>]] verwenden, für das Schweizer Zahlenformat ist mangels Alternativen, sofern anwendbar, diese Vorlage einzusetzen.}} | | |color 1={{{3|}}} |
| {{Tausendfach verwendet}} | | |color 2={{{4|}}} |
| | |letter code=[[File:Geocaching.svg|45px|alt=|klasse=skin-invert]] |
| | |text size=0.9em |
| | |text={{#switch:{{{gender|{{{1|}}}}}}|m=Dieser Benutzer ist '''[[Geocaching|Geocacher]]'''|w=Diese Benutzerin ist '''[[Geocaching|Geocacherin]]'''|#default= Diese Person betreibt '''[[Geocaching]]'''}}. |
| | }}<includeonly>{{#ifeq:{{NAMESPACENUMBER}}|2|[[Kategorie:Benutzer:Geocaching]]}}</includeonly></onlyinclude> |
|
| |
|
| Diese Vorlage entspricht grob der MediaWiki-Standardfunktion [[Hilfe:Parserfunktionen/Zahlen#formatnum|<nowiki>{{ZAHLENFORMAT}}</nowiki>]], hat jedoch erweiterte Funktionen:
| | {{Dokumentation}} |
| * das Tausendertrennzeichen wird standardmäßig entsprechend [[Wikipedia:Schreibweise von Zahlen]] erst ab der fünften Stelle angewandt, optional kann es durch Angabe eines „T“ als zweiter Parameter auch bei vierstelligen Zahlen gesetzt werden;
| |
| * ein optionaler Parameter für das Land erlaubt die Unterscheidung zwischen der Zahlenformatierung für [[Deutschland]], [[Österreich]], [[Schweiz]] und [[Liechtenstein]] (entsprechend der Angabe <code><nowiki><!-- schweizbezogen --></nowiki></code>);
| |
| * der Wert wird auf maximal zwei Nachkommastellen gerundet, so dass bei Werten mit Nachkommastellen maximal drei signifikante Stellen ausgegeben werden;
| |
| * der angegeben Parameter kann auch ein Ausdruck (z. B. <code>2 / 3</code>) sein.
| |
|
| |
|
| Die Vorlage ist weniger zur Verwendung in Artikeltexten als mehr zur Ausgabe variabler oder berechneter Werte in Infoboxen vorgesehen. Sie ist geeignet für Zahlen zwischen <code>999.999.999.999</code> und <code>-999.999.999.999</code>
| | [[Kategorie:Vorlage:Babel-Hobby|Geocaching]] |
| | |
| == Aufruf ==
| |
| <code><nowiki>{{FormatZahl|zahl|t|LAND=land}}</nowiki></code>
| |
| | |
| Der unbenannte Parameter <code>zahl</code> muss angegeben werden, alle weiteren benannten Parameter sind optional.
| |
| | |
| {| class="wikitable toptextcells"
| |
| |-
| |
| ! Parameter !! Default-Wert !! Erläuterung
| |
| |-
| |
| | <code>zahl</code>
| |
| | – keiner –
| |
| | Die zu formatierende Zahl als unbenannter Parameter in Computer-Schreibweise, d. h. ohne Tausendertrennzeichen und mit Punkt als Dezimaltrennzeichen.
| |
| Beispiel: <code>1234.567</code>
| |
| |-
| |
| | <code>t</code>
| |
| | – keiner –
| |
| | Das Tausendertrennzeichen wird auch bei vierstelligen Zahlen ausgegeben. Das „T“ muss als zweiter Parameter angegeben werden.
| |
| |-
| |
| | <code>LAND</code>
| |
| | <code>DE</code>
| |
| | Länderkürzel entsprechend [[ISO 3166|ISO 3166-1]]. Derzeit werden alle Angaben außer <code>CH</code> (für die Schweiz) und <code>LI</code> (für Liechtenstein) als Zahlenformatierung für Deutschland und Österreich interpretiert. Soll jedoch die aktuell eingestellte Oberflächensprache der MediaWiki-Software verwendet werden, ist [[Vorlage:FormatZahlLokal]] zu verwenden.
| |
| |}
| |
| | |
| == Beispiele ==
| |
| : '''Achtung, die Einrückung rechts macht <u>nicht</u> diese Vorlage, die muss man manuell je nach Ergebnis ergänzen. In Tabellen wie dieser ist die Vorlage daher unnütz.''' | |
| | |
| {| class="wikitable" style="text-align:right;"
| |
| |- class="hintergrundfarbe6"
| |
| ! Vorlage-Syntax !! Dargestelltes Ergebnis !! negativer Wert
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|1987654321.1234}}</nowiki></code> || {{FormatZahl|1987654321.1234}}{{0|,00}} || {{FormatZahl|-1987654321.1234}}{{0|,00}} | |
| |-
| |
| |<code><nowiki>{{FormatZahl|987654321.1234}}</nowiki></code> || {{FormatZahl|987654321.1234}}{{0|,00}} || {{FormatZahl|-987654321.1234}}{{0|,00}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|87654321.1234}}</nowiki></code> || {{FormatZahl|87654321.1234}}{{0|,00}} || {{FormatZahl|-87654321.1234}}{{0|,00}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|7654321.1234}}</nowiki></code> || {{FormatZahl|7654321.1234}}{{0|,00}} || {{FormatZahl|-7654321.1234}}{{0|,00}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|654321.1234}}</nowiki></code> || {{FormatZahl|654321.1234}}{{0|,00}} || {{FormatZahl|-654321.1234}}{{0|,00}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|54321.1234}}</nowiki></code> || {{FormatZahl|54321.1234}}{{0|,00}} || {{FormatZahl|-54321.1234}}{{0|,00}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|4321.1234}}</nowiki></code> || {{FormatZahl|4321.1234}}{{0|,00}} || {{FormatZahl|-4321.1234}}{{0|,00}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|321.1234}}</nowiki></code> || {{FormatZahl|321.1234}}{{0}} || {{FormatZahl|-321.1234}}{{0}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|21.1234}}</nowiki></code> || {{FormatZahl|21.1234}}{{0}} || {{FormatZahl|-21.1234}}{{0}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|1.1234}}</nowiki></code> || {{FormatZahl|1.1234}} || {{FormatZahl|-1.1234}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|.1234}}</nowiki></code> || {{FormatZahl|.1234}} || {{FormatZahl|-.1234}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|.01234}}</nowiki></code> || {{FormatZahl|.01234}} || {{FormatZahl|-.01234}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|.001234}}</nowiki></code> || {{FormatZahl|.001234}}{{0|,00}} || {{FormatZahl|-.001234}}{{0|,00}}
| |
| |- class="hintergrundfarbe-basis"
| |
| |<code><nowiki>{{FormatZahl|54321.123|T}}</nowiki></code> || {{FormatZahl|54321.123|T}}{{0|,00}} || {{FormatZahl|-54321.123|T}}{{0|,00}}
| |
| |- class="hintergrundfarbe-basis"
| |
| |<code><nowiki>{{FormatZahl|4321.123|T}}</nowiki></code> || {{FormatZahl|4321.123|T}}{{0|,00}} || {{FormatZahl|-4321.123|T}}{{0|,00}}
| |
| |- class="hintergrundfarbe-basis"
| |
| |<code><nowiki>{{FormatZahl|321.123|T}}</nowiki></code> || {{FormatZahl|321.123|T}}{{0}} || {{FormatZahl|-321.123|T}}{{0}}
| |
| |- class="hintergrundfarbe5"
| |
| |<code><nowiki>{{FormatZahl|1987654321|LAND=CH}}</nowiki></code> || {{FormatZahl|1987654321|LAND=CH}}{{0|,00}} || {{FormatZahl|-1987654321|LAND=CH}}{{0|,00}}
| |
| |- class="hintergrundfarbe5"
| |
| |<code><nowiki>{{FormatZahl|987654321|LAND=CH}}</nowiki></code> || {{FormatZahl|987654321|LAND=CH}}{{0|,00}} || {{FormatZahl|-987654321|LAND=CH}}{{0|,00}}
| |
| |- class="hintergrundfarbe5"
| |
| |<code><nowiki>{{FormatZahl|87654321|LAND=CH}}</nowiki></code> || {{FormatZahl|87654321|LAND=CH}}{{0|,00}} || {{FormatZahl|-87654321|LAND=CH}}{{0|,00}}
| |
| |- class="hintergrundfarbe5"
| |
| |<code><nowiki>{{FormatZahl|7654321|LAND=CH}}</nowiki></code> || {{FormatZahl|7654321|LAND=CH}}{{0|,00}} || {{FormatZahl|-7654321|LAND=CH}}{{0|,00}}
| |
| |- class="hintergrundfarbe5"
| |
| |<code><nowiki>{{FormatZahl|54321.123|LAND=CH}}</nowiki></code> || {{FormatZahl|54321.123|LAND=CH}}{{0|,00}} || {{FormatZahl|-54321.123|LAND=CH}}{{0|,00}}
| |
| |- class="hintergrundfarbe5"
| |
| |<code><nowiki>{{FormatZahl|4321.123|LAND=CH}}</nowiki></code> || {{FormatZahl|4321.123|LAND=CH}}{{0|,00}} || {{FormatZahl|-4321.123|LAND=CH}}{{0|,00}}
| |
| |- class="hintergrundfarbe5"
| |
| |<code><nowiki>{{FormatZahl|321.123|LAND=CH}}</nowiki></code> || {{FormatZahl|321.123|LAND=CH}}{{0|,00}} || {{FormatZahl|-321.123|LAND=CH}}{{0|,00}}
| |
| |- class="hintergrundfarbe5"
| |
| |<code><nowiki>{{FormatZahl|21.123|LAND=CH}}</nowiki></code> || {{FormatZahl|21.123|LAND=CH}}{{0}} || {{FormatZahl|-21.123|LAND=CH}}{{0}}
| |
| |- class="hintergrundfarbe5"
| |
| |<code><nowiki>{{FormatZahl|1.123|LAND=CH}}</nowiki></code> || {{FormatZahl|1.123|LAND=CH}} || {{FormatZahl|-1.123|LAND=CH}}
| |
| |- class="hintergrundfarbe-basis"
| |
| |<code><nowiki>{{FormatZahl|54321.123|T|LAND=CH}}</nowiki></code> || {{FormatZahl|54321.123|T|LAND=CH}}{{0|,00}} || {{FormatZahl|-54321.123|T|LAND=CH}}{{0|,00}}
| |
| |- class="hintergrundfarbe-basis"
| |
| |<code><nowiki>{{FormatZahl|4321.123|T|LAND=CH}}</nowiki></code> || {{FormatZahl|4321.123|T|LAND=CH}}{{0|,00}} || {{FormatZahl|-4321.123|T|LAND=CH}}{{0|,00}}
| |
| |- class="hintergrundfarbe-basis"
| |
| |<code><nowiki>{{FormatZahl|321.123|T|LAND=CH}}</nowiki></code> || {{FormatZahl|321.123|T|LAND=CH}}{{0|,00}} || {{FormatZahl|-321.123|T|LAND=CH}}{{0|,00}}
| |
| |-
| |
| |<code><nowiki>{{FormatZahl|ungültig}}</nowiki></code> || {{FormatZahl|ungültig}} ||<br />
| |
| |}
| |
| {{Dokumentation/Siehe auch |Liste=
| |
| * [[Vorlage:FormatZahlLokal]]
| |
| * [[Vorlage:FormatDate]]
| |
| }}
| |
| <includeonly>
| |
| [[Kategorie:Vorlage:Zahlenformatierung]]
| |
| [[Kategorie:Vorlage:für Vorlagen]]
| |
| </includeonly>
| |
Diesen Textbaustein aus dem Babel-System können die Geocacher unter den Benutzer*innen in ihre Benutzerseite einfügen. Dazu reicht die Eingabe von
{{Benutzer:Vorlage/Geocacher}}
Mit dem Parameter m oder w wird die Anzeige zu Dieser Benutzer ist Geocacher oder Diese Benutzerin ist Geocacherin
{{Benutzer:Vorlage/Geocacher|m}}
{{Benutzer:Vorlage/Geocacher|w}}
So können sich die Freunde dieses Hobbys hier schnell finden.
Werkzeuge
Bei technischen Fragen zu dieser Vorlage kannst du dich auch an die Vorlagenwerkstatt wenden. Inhaltliche Fragen und Vorschläge gehören zunächst auf die Diskussionsseite. Sie können ggf. auch an eine passende Redaktion, Portal usw. gerichtet werden.