This template is protected from editing.
Difference between revisions of "Template:Item price"
(+rubles) |
(merge from /sandbox: optimised some template calls, fix rubles' nbsp) |
||
Line 1: | Line 1: | ||
− | {{#switch:{{lc:{{{1|{{{currency|}}}}}}}} | + | {{#if:{{{1|}}}{{{currency|}}} |
− | | usd = <!-- | + | | {{#switch:{{lc:{{{1|{{{currency|}}}}}}}} |
+ | | usd = <!-- | ||
-->{{lang | -->{{lang | ||
| en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}} | | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}} | ||
− | | ru = {{ | + | | ru = {{ns:0}} |
}}<!-- | }}<!-- | ||
-->{{Item price/core|currency=usd|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | -->{{Item price/core|currency=usd|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | ||
-->{{lang | -->{{lang | ||
− | | en = {{ | + | | en = {{ns:0}} |
| ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}} | | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}} | ||
}} | }} | ||
− | | gbp = <!-- | + | | gbp = <!-- |
-->{{lang | -->{{lang | ||
| en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}} | | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}} | ||
− | | ru = {{ | + | | ru = {{ns:0}} |
}}<!-- | }}<!-- | ||
-->{{Item price/core|currency=gbp|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | -->{{Item price/core|currency=gbp|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | ||
-->{{lang | -->{{lang | ||
− | | en = {{ | + | | en = {{ns:0}} |
| ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}} | | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}} | ||
}} | }} | ||
− | | eur = <!-- | + | | eur = <!-- |
-->{{Item price/core|currency=eur|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | -->{{Item price/core|currency=eur|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | ||
-->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|€|{{common string|Euros}}}} | -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|€|{{common string|Euros}}}} | ||
− | | rub = <!-- | + | | rub = <!-- |
-->{{Item price/core|currency=rub|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | -->{{Item price/core|currency=rub|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | ||
− | -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|{{common string|rubles}}|{{common string|rubles-tooltip}}}} | + | -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}| {{common string|rubles}}|{{common string|rubles-tooltip}}}} |
− | | | + | }} |
+ | |||
+ | | <!-- | ||
# All of the above neatly combined. | # All of the above neatly combined. | ||
-->{{lang | -->{{lang | ||
| en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}} | | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}} | ||
− | | ru = {{ | + | | ru = {{ns:0}} |
}}<!-- | }}<!-- | ||
-->{{Item price/core|currency=usd|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | -->{{Item price/core|currency=usd|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | ||
-->{{lang | -->{{lang | ||
− | | en = {{ | + | | en = {{ns:0}} |
| ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}} | | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}} | ||
}}<!-- | }}<!-- | ||
Line 45: | Line 48: | ||
-->{{lang | -->{{lang | ||
| en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}} | | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}} | ||
− | | ru = {{ | + | | ru = {{ns:0}} |
}}<!-- | }}<!-- | ||
-->{{Item price/core|currency=gbp|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | -->{{Item price/core|currency=gbp|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | ||
-->{{lang | -->{{lang | ||
− | | en = {{ | + | | en = {{ns:0}} |
| ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}} | | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}} | ||
}}<!-- | }}<!-- | ||
Line 59: | Line 62: | ||
--> / <!-- | --> / <!-- | ||
-->{{Item price/core|currency=rub|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | -->{{Item price/core|currency=rub|item={{{item|{{BASEPAGENAME}}}}}}}<!-- | ||
− | -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|{{common string|rubles}}|{{common string|rubles-tooltip}}}} | + | -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}| {{common string|rubles}}|{{common string|rubles-tooltip}}}} |
}}<noinclude>{{doc begin}} | }}<noinclude>{{doc begin}} |
Revision as of 22:23, 10 October 2011
$Template:Dictionary/price/item price / £Template:Dictionary/price/item price / Template:Dictionary/price/item price€ / Template:Dictionary/price/item price rub
Documentation for Item price
{{Item price}}
is used to format prices with{{tooltip}}
s and the proper currency symbols.{{Item price/core}}
is used to get the price directly.{{Dictionary/price}}
stores the actual price values. Edit them there.- To edit the translations for 'United States dollars', etc, please see
{{Dictionary/common strings}}
.
Usage
{{item price|currency=usd}}
on the article Black Box generates: $1.99{{item price|item=Familiar Fez}}
generates: $7.49 / £5.99 / 7.15€ / 695rub / R$ 37.99 / 30.95zł- You can also remove the tooltips on the currency symbols:
{{item price|item=Degreaser|tooltips=no}}
generates: $1.99 / £1.59 / 1.89€ / 185rub / R$ 9.99 / 8.25zł