Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Size/doc: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
{{TemplateBox
{{TemplateBox
|1=1 or
|1=1
|1d=Alternative name: "unit". Unit of input (must be one of: cm, m, mm, km, in, ft, yd, mi).
|1d=Alternative name: "unit". Unit of input (must be one of: cm, m, mm, km, in, ft, yd, mi).
|1def=cm
|1def=cm

Revision as of 13:02, 21 April 2010

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 than measurements will be shown in both centimeters and inches, if user language is German than only metric units will be shown. Template mostly Used in the "Dimensions" field of a Painting template.

Usage

{{Size |1= |2= |3= |4= |prec= |lang= }}

Template parameters

ParameterDescriptionDefaultStatus
1Alternative name: "unit". Unit of input (must be one of: cm, m, mm, km, in, ft, yd, mi).cmrequired
2Alternative name: "x" or "width". Width (in the declared unit, with "." as decimal separator).0required
3Alternative name: "y" or "height". Height (in the declared unit, with "." as decimal separator).0optional
4Alternative name: "z" or "depth". Depth (in the declared unit, with "." as decimal separator).0optional
precConversion precision (optional number of decimal digits).2optional
langlanguage code (only needs to be provided if the language shall be fixed and independant from the user's preferences)value of {{int:Lang}}optional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: no user group specified

Relies on:
{{Formatnum}}

Localization

English

This template is localized through {{Autotranslate}}.


To add your language to the list of languages supported by this template, please copy the code of Template:Size/en (or any other language version you prefer to translate) and replace the text strings in there (the form below can be used to create a translation, the English version is preloaded in the edit box). Please change the parameter lang from en (or whatever language you are translating) to the language code of your language.



Examples

Code Output Notes
{{Size|cm|123}} 123 cm (48.4 in) 1D version
{{Size|in|123|456}} 123 cm (48.4 in) × 456 cm (15 ft) 2D version
{{Size|ft|123|456|789}} 123 cm (48.4 in) × 456 cm (15 ft) × 789 cm (25.9 ft) 3D version
{{Size|km|12.1234|98.1234|prec=1}} 12.1 km (13258.3 yd) × 98.1 km (61 miles) Use of "prec" parameter
{{Size|mi|12.12|98.12|lang=fr}} 12.1 miles (19.5 km) × 98.1 miles (157.9 km) Use of "lang" parameter


Cookies help us deliver our services. By using our services, you agree to our use of cookies.