Difference between revisions of "Template:Dec2rom"

From Istaria Lexica

(combined ifs into an equivalent switch)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|{{#ifexpr:{{{1}}} = 1|I|{{#ifexpr:{{{1}}} = 2|II|{{#ifexpr:{{{1}}} = 3|III|{{#ifexpr:{{{1}}} = 4|IV|{{#ifexpr:{{{1}}} = 5|V|{{#ifexpr:{{{1}}} = 6|VI}}}}}}}}}}}}}}</includeonly><noinclude>[[Category:Text Management Templates]]{{Documentation}}</noinclude>
+
<includeonly>{{#switch:{{#expr:{{{1|}}}}}
 +
| 1 = I
 +
| 2 = II
 +
| 3 = III
 +
| 4 = IV
 +
| 5 = V
 +
| 6 = VI
 +
| #default = {{{1|}}}
 +
}}</includeonly><noinclude>[[Category:Utility Templates]]{{Documentation}}</noinclude>

Latest revision as of 21:47, 1 October 2022

Template documentation (for the template shown above, sometimes hidden or invisible)

Description[edit]

Converts decimal numbers into romanian ones.

  • Find pages using this template
  • Currently supports numbers 1-6
  • if no number is provided, outputs nothing

Syntax[edit]

{{Dec2rom|number}}

Examples[edit]

{{Dec2rom|1}}
{{Dec2rom|3}}
{{Dec2rom|}}
Visit Template:Dec2rom/doc to edit this text. (How to: document correctly)