Template:PKRConvert


Documentation icon Template documentation[view] [edit] [history] [purge]


Purpose

The purpose of this template is to automatically convert and format currency from Pakistani rupees to other currencies (United States Dollars by default) applying adjustment for inflation where appropriate. Rates of exchange and inflation must be manually copied by editors therefore the template's output does not necessarily reflect the present exchange rates or price indices but, rather, reflects the rates and indices at the time of the last update.

Usage

{{PKRConvert|rupee_value|currency_formatting|rounding digits|nolink=(yes/no)|to=|year=}}

Parameters

A description of the template's parameters are listed below.

Field name Usage Description
rupee_value mandatory The value, in Pakistani rupees, that needs to be converted. The template will not accept pre-formatted values (e.g. 1,234)
currency_formatting optional Used to represent larger numbers. Available options include :
  • k – to represent thousand(s)
  • l – to represent lakh(s)
  • c – to represent crore(s)
  • m – to represent million(s)
  • b – to represent billion(s)
  • t – to represent trillion(s)
  • Brackets in the sense may be singular (or) plural.
rounding_digits optional Used to round significant digits. Negative values (-2, -3) can be used to round values to the nearest hundred or thousand, etc. A value of "0" will drop paise or cent values from the converted number. By default the conversion will be rounded to two significant figures.
Refer to the Examples section below for more examples.
nolink optional This parameter gives you the option of not internally linking currency names (Rupees and paise) and number names (lakh and crore). By default, the parameter is set to "no" (i.e. it is set to link). Currency and number names will be displayed with no links when the parameter is set to "yes". Per WP:OVERLINK the currencies converted to are not linked.
year optional This parameter allows for inflation. Historic rupee values will be inflated to current values then converted.
to optional This parameter allows for conversion to various different currencies (and some combinations). The US, Canadian, NZ and Australian dollars, the euro, the UK pound and the Bangladeshi taka are supported.

Examples

PKRConvert syntax Results
{{PKRConvert|1}} Template:Pakistani Rupee1 (Template:PKRConvert/USD)
{{PKRConvert|500}} Template:Pakistani Rupee500 (Template:PKRConvert/USD)
{{PKRConvert|0.05}} 5 paise (Template:PKRConvert/USD)
{{PKRConvert|0.01}} 1 paisa (Template:PKRConvert/USD)
{{PKRConvert|0.86}} 86 paise (Template:PKRConvert/USD)
{{PKRConvert|30|m}} Template:Pakistani Rupee30 million (Template:PKRConvert/USD)
{{PKRConvert|0.72|m}} Template:Pakistani Rupee0.72 million (Template:PKRConvert/USD)
{{PKRConvert|36|b}} Template:Pakistani Rupee36 billion (Template:PKRConvert/USD)
{{PKRConvert|36|b|-2}} Template:Pakistani Rupee36 billion (Template:PKRConvert/USD)
{{PKRConvert|0.80|B}} Template:Pakistani Rupee0.80 billion (Template:PKRConvert/USD)
{{PKRConvert|32|t}} Template:Pakistani Rupee32 trillion (Template:PKRConvert/USD)
{{PKRConvert|400|c}} Template:Pakistani Rupee400 crore (Template:PKRConvert/USD)
{{PKRConvert|400|c|0}} Template:Pakistani Rupee400 crore (Template:PKRConvert/USD)
{{PKRConvert|19|k}} Template:Pakistani Rupee19,000 (Template:PKRConvert/USD)
{{PKRConvert|53|m|0|nolink=yes}} Template:Pakistani Rupee53 million (Template:PKRConvert/USD)
{{PKRConvert|123|k|year=1990}} Template:Pakistani Rupee123,000 (Template:PKRConvert/inflation)
{{PKRConvert|319|to=GBP}} Template:Pakistani Rupee319 (Template:PKRConvert/GBP)
{{PKRConvert|753|m|year=2000|to=USD EUR}} Template:Pakistani Rupee753 million (Template:PKRConvert/inflation)

Updating

It is important to keep the figures used in these conversions up to date. Data for the exchange rates is kept at {{PKRConvert/CurrentRate}}. Data for the inflation rate is at {{Inflation/PK/dataset}}. Feel free to update these if you are able.