ଛାଞ୍ଚ:Track gauge

ଉଇକିପିଡ଼ିଆ ରୁ
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

This template accepts a track gauge and returns that defined track gauge well formatted, plus the converted size value by another unit:

  • {{Track gauge|1520 mm}}୧,୫୨୦ mm (4 ft 11 2732 in)
  • {{Track gauge|4 ft}}4 ft (୧,୨୧୯ mm)

Extra options are available:

Input options[ସମ୍ପାଦନା]

The first parameter specifies the gauge:

  • {{Track gauge|1435 mm}}୧,୪୩୫ mm (4 ft 8 12 in)
  • {{Track gauge|4 ft 8.5 in}}4 ft 8 12 in (୧,୪୩୫ mm)
  • {{Track gauge|4 ft 8 1/2 in}}4 ft 8 12 in (୧,୪୩୫ mm)
  • {{Track gauge|56.5 in}}4 ft 8 12 in (୧,୪୩୫ mm)
  • {{Track gauge|Standard gauge}}୧,୪୩୫ mm (4 ft 8 12 in)

Rail track gauges can be entered as they are defined: in units mm or ft in. Also common accepted names can be used, see below.

The input value (a length, in metric or imperial units) must be a defined track gauge. Currently 137 gauges are defined by metric units, and 136 by imperial units. Some are defined in both unit sytems, in both, such as the standard gauge.

  • When an input value is not recognised by the template, the template simply returns the input as it is: {{Track gauge|25in}} → 25in
The page with this unknown input is also listed in a maintenance category, in the background, that signals interested editors that there is a new rail gauge used in Wikipedia. More on this below.
  • Some gauges in metric are defined in metres: 1 m is recognised. However, it is not available for all metric defined gauges. Using mm is a safer bet.

List of defined track gauges[ସମ୍ପାଦନା]

ଛାଞ୍ଚ:Track gauge/doc/input options

Formatting input[ସମ୍ପାଦନା]

When entering a track gauge (like {{Track gauge|1435mm}}, these are formatting options. Keep in mind that only defined gauges are recognised.

Spacing is free, and fractions can be used in imperial units. Primes (' and ") may be used for [foot, inch]. Any [foot, inch] size can be entered in all-inches (4 ft 8 1/2 in equals 56 1/2 in and 56.5 in).

Input options, examples
Result Note
1435 mm ୧,୪୩୫ mm (4 ft 8 12 in) standard gauge
standard gauge ୧,୪୩୫ mm (4 ft 8 12 in) standard gauge, by name
4 ft 8.5 in 4 ft 8 12 in (୧,୪୩୫ mm) standard gauge, this way puts imperial units first
UK sg 4 ft 8 12 in (୧,୪୩୫ mm) standard gauge, this way puts imperial units first
56.5 in 4 ft 8 12 in (୧,୪୩୫ mm) standard gauge, by all-inches
56.5" 4 ft 8 12 in (୧,୪୩୫ mm) standard gauge, using primes
56 1/2 in 4 ft 8 12 in (୧,୪୩୫ mm) standard gauge, using slash for fraction
1 m ୧,୦୦୦ mm (3 ft 3 38 in) 1 m is recognised, but not many more in m. Better use mm
16.5 mm ୧୬.୫ mm (0.65 in) HO scale model railway
16.5 in 16 12 in (୪୧୯ mm) Miniature railway
7 ft 0.25 in 7 ft 14 in (୨,୧୪୦ mm) Brunel
2140 mm 2140 mm Not recognised (so no converted value). This track gauge, Brunel's, is not defined in mm.
65 in 65 in Input not recognised (so no converted value); output copies the input.
This is a good way to enter an uncovered rail gauge on a page: other editors will notice (and can add a new gauge to the template!).


{{Track gauge
| lk=on
| first=imp, met
| disp= s, /, 1, br, [], <any literal text>
| al=on
| allk=on
| nowrap=off (default), on, all
| addcat=no
| unitlink=on
Optional parameters
Parameter What it does Example (code) Example (output)
lk=on Links the defining measure (first measure)
"defined size" depends on input
{{Track gauge|3ft6in|lk=on}}

{{Track gauge|1067mm|lk=on}}

3 ft 6 in (୧,୦୬୭ mm)
୧,୦୬୭ mm (3 ft 6 in)
al=on Adds the alternate name after the gauge measurement values {{Track gauge|sg|al=on}} ୧,୪୩୫ mm (4 ft 8 12 in)
allk=on Adds a wikilink to the alternate name where applicable {{Track gauge|sg|allk=on}} ୧,୪୩୫ mm (4 ft 8 12 in) standard gauge
Puts the requested measure first (metric, imperial) {{Track gauge|1000mm|first=imp}} 3 ft 3 38 in (୧,୦୦୦ mm)
disp=any text The text will be written between the measurements, two spaces added. Brackets are omitted. Text must be 2 characters or more. (codes for |disp= are processed as described: 1, s, /, br). {{Track gauge|sg|disp=also defined as being}} ୧,୪୩୫ mm also defined as being 4 ft 8 12 in
disp=s or / Uses a slash as a separator rather than parentheses {{Track gauge|sg|disp=s}} ୧,୪୩୫ mm/​4 ft 8 12 in
disp=[] Uses a square brackets rather than parentheses {{Track gauge|sg|disp=[]}} ୧,୪୩୫ mm [4 ft 8 12 in]
disp=1 Only shows the first measure (may be used when repeated on a page
or in conjunction with first= to display the output only)
{{Track gauge|sg|disp=1}} ୧,୪୩୫ mm
disp=br Forces a line break after the first size (and also before any gauge name) {{Track gauge|sg|disp=br}} ୧,୪୩୫ mm
(4 ft 8 12 in)
nowrap=off (default), on, all Sets possible line break (line wrap): after between the measurements (off=defalt), not (on, all), or not at all when named gauge is present. (note: until May 2014, default behaviour was no break between the measurements. This has changed.) {{Track gauge|sg|nowrap=on}} ୧,୪୩୫ mm (4 ft 8 12 in)
addcat=no Will not add a maintenance category {{Track gauge|sg|addcat=no}} ୧,୪୩୫ mm (4 ft 8 12 in)
unitlink=on Adds wikilinks to the measurement unit labels {{Track gauge|sg|unitlink=on}} ୧,୪୩୫ mm (ft 8 12 in)
  • Names can be universal, being defined worldwide. For example: Iberian gauge, ୧,୬୬୮ mm (5 ft 5 2132 in) . Other names can be localor culturally restricted, for example the name "Cape gauge" is used in South Africa for 3 ft 6 in (୧,୦୬୭ mm), but not in Japan (in Japan that same track gaugfe is not named).
  • Also, two sizes can lead to one gauge name.

Named gauges[ସମ୍ପାଦନା]

Established gauge names can be entered. The word "gauge" can be omitted. Case-insensitive (A=a). See also the |al=, |allk= parameters (below), to show a gauge name in the outcome.

Input Result Note
{{Track gauge|Baltimore gauge}} 5 ft 4 12 in (୧,୬୩୮ mm)
{{Track gauge|Baltimore}} 5 ft 4 12 in (୧,୬୩୮ mm) Omitting " gauge", same effect
{{Track gauge|baltimore}} 5 ft 4 12 in (୧,୬୩୮ mm) Case-insensitive (A=a)
{{Track gauge|baltimore|al=on}} 5 ft 4 12 in (୧,୬୩୮ mm) |al=on shows the alternative (name)
{{Track gauge|baltimore|allk=on}} 5 ft 4 12 in (୧,୬୩୮ mm) Baltimore streetcar gauge |allk=on shows the alternative (name), linked
{{Track gauge|baltimore|lk=on|al=on}} 5 ft 4 12 in (୧,୬୩୮ mm) |lk=on links the size (as always)
{{Track gauge|Baltimore streetcar gauge}} 5 ft 4 12 in (୧,୬୩୮ mm) This one has more names
{{Track gauge|Bosnian}} ୭୬୦ mm (2 ft 5 1516 in)
{{Track gauge|Brunel}} 7 ft (୨,୧୩୪ mm)
{{Track gauge|Cape}} 3 ft 6 in (୧,୦୬୭ mm)
{{Track gauge|Iberian}} ୧,୬୬୮ mm (5 ft 5 2132 in)
{{Track gauge|Indian}} 5 ft 6 in (୧,୬୭୬ mm)
{{Track gauge|Victorian}} ୧,୬୦୦ mm (5 ft 3 in)
{{Track gauge|Irish}} 5 ft 3 in (୧,୬୦୦ mm)
{{Track gauge|metre}} ୧,୦୦୦ mm (3 ft 3 38 in)
{{Track gauge|Ohio}} 4 ft 10 in (୧,୪୭୩ mm)
{{Track gauge|Pennsylvania}} 5 ft 2 12 in (୧,୫୮୮ mm)
{{Track gauge|Pennsylvania trolley}} 5 ft 2 12 in (୧,୫୮୮ mm)
{{Track gauge|Russian}} ୧,୫୨୦ mm (4 ft 11 2732 in)
{{Track gauge|Scotch}} 4 ft 6 in (୧,୩୭୨ mm)
{{Track gauge|standard gauge}} ୧,୪୩୫ mm (4 ft 8 12 in) Also: "sg", "metsg" (metric units first)
{{Track gauge|US sg}} 4 ft 8 12 in (୧,୪୩୫ mm) Also: "imp sg", "UK sg", "NA sg" (imperial units first)
{{Track gauge|Swedish three foot}} ୮୯୧ mm (2 ft 11 332 in)
{{Track gauge|Swedish}} ୮୯୧ mm (2 ft 11 332 in)
{{Track gauge|Toronto}} 4 ft 10 78 in (୧,୪୯୫ mm)

English variant (ENGVAR)[ସମ୍ପାଦନା]

For articles written in US-English, it is possible to set parameter |engvar=en-US. In this situation, the US-English spelling is shown (metER):

୧,୦୦୦ mm (3 ft 3 38 in) meter gauge

Why not use {{Convert}}?[ସମ୍ପାଦନା]

To convert a track gauge, using {{Convert}} comes to mind. For example, standard gauge:

  • {{Convert|1435|mm|ftin|abbr=on}} → ୧,୪୩୫ mm (୪ ft ୮.୫ in)
However, this has some disadvantages. First of all, track gauges are defined by an institute, not just measured. The list of defined track gauges is limited, and oversee-ablle (today: some 260 sizes, by mm, are defined).
Using {{Track gauge}} allows us to track (follow) all articles with a specific gauge (see the options-list on this page, and Category:Articles that mention a specific track gauge).
Also, the track definition can be directly linked to the sourcing article: ୧,୦୬୭ mm (3 ft 6 in).
Further more, the template allows to recognise named gauges such as "Russian gauge".

Tracking category[ସମ୍ପାଦନା]

{{Track gauge}} detects that an undefined gauge is entered, and signal for maintenance. For example, metre gauge is only defined in metric. Entering an imperial size would categorise that article in Category:Articles using template 'Track gauge' with unrecognized input (୦).


This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Track gauge

The template formats a track gauge size into standard notation and adds the conversion into the imperial/metric (other) size

Template parameters

Track gauge definition1

Defined track gauge, in mm or ft in. Also can accept: ' '', m, gauge name

Link top measurement unitslk

=on: adds link to the gauge defining article

Alternative nameal

=on: Add gauge name (if existing)

Alternative name, linkedallk

=on: Add gauge name (if existing) and link to its wiki page

Display converted gaugedisp

Separator for the converted value: 1=none (first value only); =s, /: slash separator; =''Any text'' (2 or more characters): Any literal text written between the two values.

(...) brackets
Which unit to mention firstfirst

=met: metric first; =imp: imperial first (default: input unit)

By input
Allow line wrapping of textnowrap

wrap=off, on, all: allows lin breaking between the two measurements. Default: on. 'all' disallows linebreaking wiothing an alternative name

Categorize pageaddcat

=no: do not categorize


See also[ସମ୍ପାଦନା]

ଛାଞ୍ଚ:Navbox track gauge categories


External links[ସମ୍ପାଦନା]

  • Light Rail Transit Association (LRTA)
  • Morrisson, Allen (2013). "Electric transport in latin america". Cite has empty unknown parameter: |1= (help) Latin America is very well covered
  • "A world of trams and urban transit". Light Rail Transit Association (LRTA)). UK based, covering most countries
Scaled rail models