සැකිල්ල:INRConvert/ලේඛය
Purpose
[සංස්කරණය]The purpose of this template is to automatically convert and format currency from Indian 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
[සංස්කරණය]{{INRConvert|rupee_value|currency_formatting|rounding digits|lk=|to=|year=}}
Parameters
[සංස්කරණය]A description of the template's parameters are listed below.
Field name | Usage | Description |
rupee_value |
mandatory | The value, in Indian Rupees, that needs to be converted. The template will not accept pre-formatted values (i.e. 1,234). |
currency_formatting |
optional | Used to represent larger numbers. Available options are as follows.
|
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. |
lk |
optional | This parameter gives you the option of internally linking currency names (rupees and paise) and/or number names (lakh and crore). By default, the parameter is set to "off" (i.e. it is set not to link). Available options are as follows.
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 (default), Canadian, NZ and Australian dollars, the euro, the UK pound and the Bangladeshi taka are supported. |
Examples
[සංස්කරණය]INRConvert syntax | Results |
---|---|
{{INRConvert|1}} | 1 (1.6¢ US) |
{{INRConvert|500}} | 500 (US$7.80) |
{{INRConvert|0.05|lk=on}} | 5 පයිස (0.078¢ US) |
{{INRConvert|0.01}} | 1 පයිසා (0.016¢ US) |
{{INRConvert|0.86}} | 86 පයිස (1.3¢ US) |
{{INRConvert|30|m}} | 30 මිලියන (US$470,000) |
{{INRConvert|0.72|m}} | 0.72 මිලියන (US$11,000) |
{{INRConvert|36|b}} | 36 බිලියන (US$560 මිලියන) |
{{INRConvert|36|b|-2}} | 36 බිලියන (US$600 මිලියන) |
{{INRConvert|80|b|lk=b}} | 80 බිලියන (US$1.2 බිලියන) |
{{INRConvert|32|t|lk=r}} | 32 ට්රිලියන (US$500 බිලියන) |
{{INRConvert|400|c|lk=on}} | 400 කෝටි (US$62 මිලියන) |
{{INRConvert|400|c|0}} | 400 කෝටි (US$62 මිලියන) |
{{INRConvert|19|k}} | 19,000 (US$300) |
{{INRConvert|53|m|0}} | 53 මිලියන (US$826,424) |
{{INRConvert|123|k|year=1990}} | 123,000 (2016 දී Formatting error: invalid input when rounding හෝ US$ Formatting error: invalid input when rounding ට සමාන ය) |
{{INRConvert|319|to=GBP}} | 319 (£3.80) |
{{INRConvert|753|m|year=2000|to=USD EUR}} | 753 මිලියන (2016 දී Formatting error: invalid input when rounding, US$ Formatting error: invalid input when rounding හෙවත් € Formatting error: invalid input when rounding ට සමාන ය) |
Updating
[සංස්කරණය]It is important to keep the figures used in these conversions up to date. Data for the exchange rates is kept at {{INRConvert/CurrentRate}}. Data for the inflation rate is at {{Inflation/IN/dataset}} (see Template:Inflation#Developer documentation for details). Feel free to update these if you are able.