Template:Size/doc
Autres actions
(Cette partie de la documentation n’est disponible que dans certaines langues).
Displays a 1D (length), 2D (width × height) or 3D (width × height × depth) size, formatted according to localized format. For example if user language is English then measurements will be shown in both centimeters and inches, if user language is German than only metric units will be shown. This template is mainly used in the "Dimensions" field of an {{Artwork}} template.
Utilisation
{{Size |unit= |height= |width= }}
Paramètres du modèle
| Paramètre | Description | Par défaut | État | |
|---|---|---|---|---|
unit1 | Unit of input (must be one of: cm, m, mm, km, in, ft, yd, mi). | cm | obligatoire | |
height | height (with word "height" displayed) | empty | facultatif | |
width | width (with word "width" displayed) | empty | facultatif | |
length | length (with word "length" displayed) | empty | facultatif | |
depth | depth (with word "depth" displayed) | empty | facultatif | |
diameter | diameter (with word "diameter" displayed) | empty | facultatif | |
thickness | thickness (with word "thickness" displayed) | empty | facultatif | |
prec | Conversion precision (optional number of decimal digits). | 1 (2 for mm to inches) | facultatif | |
lang | language code (only needs to be provided if the language shall be fixed and independant from the user's preferences) | value of {{int:Lang}} | facultatif | |
1 | Alternative name for "unit". Unit of input (must be one of: cm, m, mm, km, in, ft, yd, mi). Deprecated. | cm | obsolète | |
2 | First dimension measured. Deprecated. | empty | obsolète | |
3 | A second dimension measured. Deprecated. | empty | obsolète | |
4 | A third dimension measured. Deprecated. | empty | obsolète | |
Informations complémentaires
Ce modèle est prévu pour être utilisé dans les espaces de noms suivants : l’espace de noms Fichier (File)
Ce modèle est prévu pour être utilisé par les groupes d’utilisateurs suivants : aucun groupe d’utilisateurs spécifié
Repose sur :
Module:Size
See also
(Cette partie de la documentation n’est disponible que dans certaines langues).
Internationalisation
Pour ajouter votre langue à la liste des langues prévues pour ce modèle, veuillez modifier le modèle et ajouter une ligne au « {{LangSwitch|}} ». La syntaxe est « |xx=Votre traduction » (xx étant le code ISO 639-1 de votre langue). Par exemple, « |fr=Votre traduction ».
(Cette partie de la documentation n’est disponible que dans certaines langues).
All unit translations are in Module:I18n/units.
Exemples
| Code | Output | Notes |
|---|---|---|
| {{Size|unit=m|height=10|width=20}} | Height : 10 m ; Width : 20 m | Use of name parameters |
| {{Size|unit=mi|width=10|height=20|depth=30}} | Height : 20 miles (32.2 km) ; Width : 10 miles (16.1 km) ; Depth : 30 miles (48.3 km) | Use of name parameters |
| {{Size|cm|12.1234|98.1234|prec=1}} | 12.1 cm × 98.1 cm | Use of "prec" parameter |
| {{Size|in|12.12|98.12|lang=fr}} | 12.1 pouces (30.8 cm) × 98.1 pouces (249.2 cm) | Use of "lang" parameter |
| {{Size|cm|123}} | 123 cm | 1D version |
| {{Size|in|123|456}} | 123 pouces (312.4 cm) × 456 pouces (11.6 m) | 2D version |
| {{Size|ft|123|456|789}} | 123 pieds (37.5 m) × 456 pieds (139 m) × 789 pieds (240.5 m) | 3D version |
Displays a size, formatted according to localised format.
| Paramètre | Description | Type | État | |
|---|---|---|---|---|
| lang | lang | language code
| Chaîne | facultatif |
| unit | unit | Unit of input
| Chaîne | obligatoire |
| height | height | aucune description | Nombre | facultatif |
| width | width | aucune description | Nombre | facultatif |
| length | length | aucune description | Nombre | facultatif |
| depth | depth | aucune description | Nombre | facultatif |
| diameter | diameter | aucune description | Nombre | facultatif |
| thickness | thickness | aucune description | Nombre | facultatif |
| prec | prec | Conversion precision (optional number of decimal digits)
| Inconnu | facultatif |