Template:INRConvert
This template employs intricate features of template syntax. You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. Remember that you can conduct experiments, and should test all improvements, in either the general Template sandbox or your user space before changing anything here. |
Please refer to /bugs for a list of known bugs. Alternatively, a list of resolved problems is detailed here. |
Purpose
To automatically convert and format currency from Indian Rupees (Rs.) to United States Dollars. (US$) for use on India-related articles on Wikipedia or wherever appropriate. The actual Rupee-Dollar exchange rate is manually copied each week by a Wikipedia editor from the U.S. Federal Reserve reported data and posted into this template. The conversion is from the value posted by the Wikipedia editor into U.S. dollars. The output does not reflect the present exchange rate; rather, the output reflects the exchage rate posted by the Wikipedia editor at the time the template exchange multiplier is updated.
Usage
{{INRConvert|rupee_value|currency_formatting|rounding digits|nolink=(yes/no)}}
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 (ie. 1,234) |
currency_formatting |
optional | Used to represent larger numbers. Available options include : |
rounding_digits |
optional | Used to round significant digits. The default value for most numbers with currency formatting is "2" (representing the two digits of paise and cents. 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. 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 US$). By default, the parameter is set to "no" (ie. it is set to link Rupees and US$). Currency names will be displayed with no links when the parameter is set to "yes". |
- Foreign Exchange Data Source
- This template will always aim to convert Indian Rupees at current Dollar prices. Source data for INR > USD rates is obtained from the United States Federal Reserve online. Data sourced from the Federal Reserve is public domain.
Examples
INRConvert syntax | Results |
---|---|
{{INRConvert|1}} | Rs. 1 (US$ 0.02) |
{{INRConvert|500}} | Rs. 500 (US$ 12.74) |
{{INRConvert|0.05}} | 5 paise (less than 1¢) |
{{INRConvert|0.86}} | 86 paise (2¢) |
{{INRConvert|30|m}} | Rs. 30 million (US$ 639,000) |
{{INRConvert|0.72|m}} | Rs. 0.72 million (US$ 15,336) |
{{INRConvert|36|b}} | Rs. 36 billion (US$ 766.8 million) |
{{INRConvert|36|b|-2}} | Rs. 36 billion (US$ 800 million) |
{{INRConvert|80|B}} | Rs. 0.80 billion (US$ 17.04 million) |
{{INRConvert|32|t}} | Rs. 32 trillion (US$ 681.6 billion) |
{{INRConvert|400|c}} | Rs. 400 crore (US$ 85.2 million) |
{{INRConvert|400|c|0}} | Rs. 400 crore (US$ 85 million) |
{{INRConvert|19|k}} | Rs 19,000 (US$ 404.7) |
{{INRConvert|53|m|0|nolink=yes}} | Rs. 53 million (US$ 1.13 million) |
The above documentation is transcluded from Template:INRConvert/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |