Jump to content

Template talk:INRConvert

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Rupee-dollar conversion

[edit]

There may be value to modify the template to output the rupee-dollar conversion for a given date. Basically, a subpage of this template would include a conversion table of the rupee-dollar conversion multiplier for each 12 Noon Buying Rate going back as far as there is data. Then, if someone had need for the rupee-dollar conversion on January 6, 1987, they would need only type in the date and fill in the other parameters presently in the template. If the date parameter is blank, then the default value will be the last value in the table. Plus, rather than modifying the value in the template, the values of the rupee-dollar conversion multiplier table would only need updating. The rupee-dollar conversion value going back to October 5, 1993 can be found at U.S. Federal Reserve bank. I'm sure that the U.S. government has published more extensive tables elsewhere. The best situation would be if Wikipedia could tap into external conversion tables for internal usage, which probably is true for any time-dependent conversion. -- Suntag 14:07, 5 December 2008 (UTC)[reply]

Thanks, didn't know about the Fed stopping the publication of forex rates. We'll have to rely on data from other sources like Bloomberg or India's RBI going forward. Thanks AreJay (talk) 18:48, 8 December 2008 (UTC)[reply]
I concur: the template could output the rupee-dollar conversion for a given date. My reasoning is the following: if I find a dated source, i.e. 1997, I would have problems figuring the meaning of the conversion (inflated, not inflated, actual, which rate, and so on). And putting the actual rate for a 1997 value has no sense. Better do with the 1997 exchange rate, and let the reader know, so he could figure out, according to its knowledge, the significance of the converted value. Stating the 1997 value at the 1997 exchange rate has the advantage of a objective information, no interpretations. Result example: ₹17000 crore (US$5.43 billion - 1997 FX rate) instead of 2,56 at the actual rate. FX rate should be linked Exchange rate. --Robertiki (talk) 23:40, 3 April 2016 (UTC)[reply]
I see that in the following discussion, a alternative solution. But I don't agree. Proposal: could we add a parameter to input our conversion rate ? --Robertiki (talk) 23:47, 3 April 2016 (UTC)[reply]

Relevancy issue

[edit]

I initially throught that this template tapped into historical conversion data. On reviewing the code, I realized that it did not. The more I think about this template, the more I become concerned. For example, in the Fodder Scam article, Rs. 950 crore were taken in 1997. The article taps into this conversion template to say that Rs. 950 crore was US$ 191.81 million in 1997. That is not true since this template uses today's conversion value, not the one from 1997. Also, even if the template output were change to read something like Rs. 950 crore (recent exchange rate US$ 191.81 million), that would not seem relevant to the topic because 950 crore in 1997 meant something different from 950 crore in 2008. The correct approach would be to convert 950 crore in 1997 to U.S. dollars in 1997, then {{inflation}} adjust the U.S. dollars into 2008. That would provide a better characterization of 950 crore in 1997 in today's U.S. dollars. -- Suntag 14:35, 5 December 2008 (UTC)[reply]

I appreciate the point that you're making. However, the idea behind this template is to simplify the conversion rupees to dollars as of the current date. Indian articles (and I would suspect, several other articles) on Wikipedia, prior to the creation of the template used current currency rates to display dollar equivalents, even for historic values. While I admit that there is a systemic logic flaw in the way this is treated on Wikipedia, all the template does is allow users to semi-automate that process. Second point...I am working on a system that will adjust Indian rupees' historic values based on inflation. The code is currently being tested (User:AreJay/INRInflation/test) and can certainly be incorporated into INRConvert once it is determined that it is functioning as needed. Thanks AreJay (talk) 18:46, 8 December 2008 (UTC)[reply]
Do we convert then inflate or inflate then convert? That is, do we convert from 1997 rupees to 1997 US dollars using 1997 exchange rates then use US inflation rates to get to 2024 dollars (as Suntag seems to be suggesting above) or do we go from 1997 rupees to 2024 rupees using Indian inflation rates and then convert to US dollars using current exchange rates (which seems to be AreJay approach)? I think the latter approach makes more sense and even include the current rupee value. I think that using the local inflation rate gives a better reflexion of what the local currency was worth. AreJay has, as he mentions, made a start on this but it only goes to 2008. It would be good to get some more data (up-to-date data). This would be added to {{inflation}} (as opposed to being internalised here). So you have something like "₹x (equivalent to ₹y or US$z in 2024)". JIMp talk·cont 05:37, 21 March 2013 (UTC)[reply]
I have taken AreJay's figures, extended them to Feb 2013 and added them to {{inflation}}. Now the template takes an historic rupee value, applies inflation to get the current rupee equivalent then converts. For example {{INRConvert|950|c|year=1997}} gives "950 crore (equivalent to 48 billion or US$580 million in 2023)". JIMp talk·cont 15:18, 22 March 2013 (UTC)[reply]

Great template

[edit]

This is a great template. It would be wonderful to have most of the worlds major currencies automatically convertible via a master template, drawing data automatically via scripts from a reliable source, on a weekly or daily basis. It would high-lite an advantage of Wikipedia over static resources (books, journals, papers), where currency conversion is always outdated. Green Cardamom (talk) 17:56, 25 November 2010 (UTC)[reply]

Extra space when US$ is $1 billion or more

[edit]

When the result is US$ is $1 billion or more an extra space is inserted between the and the amount.

  • 10 billion (US$120 million) {{INRConvert|10|b}} - result on my screen is "10 billion (US$981.2 million)"
  • 44 billion (US$530 million) {{INRConvert|44|b}} - result on my screen is "44 billion (US$981.2 million)"
  • 45 billion (US$540 million) {{INRConvert|45|b}} - result on my screen is " 45 billion (US$1 billion)"
  • 100 billion (US$1.2 billion) {{INRConvert|100|b}} - result on my screen is " 100 billion (US$1 billion)"

Is this expected/desired behavior or would someone in India normally write "100 billion?" --Marc Kupper|talk 19:22, 3 July 2011 (UTC)[reply]

This strange bug has been fixed in today's rewrite. JIMp talk·cont 16:15, 19 March 2013 (UTC)[reply]

Linking the

[edit]

Can the existing references to {{INR}} be changed to instead be {{INR|link=Indian rupee}}? At least one editor was confused by "10 billion (US$120 million)" as he or she did not recognize the symbol. If INR linked the result would be "10 billion (US$223 million)" which looks the same but the is linked. --Marc Kupper|talk 23:52, 6 July 2011 (UTC)[reply]

I have added the rupee link. JIMp talk·cont 16:47, 19 March 2013 (UTC)[reply]

Outdated

[edit]

I'm sorry to note this but the rupee-dollar conversion factor is very very outdated. By present standards, the conversion factor is approx. 45 = US$1. This is quite far from the actual figure of 49 = US$1. I suggest that this misleading number be chnaged at the earliest. AnkitBhattTalk to me!!LifEnjoy 13:43, 2 November 2011 (UTC)[reply]

I've updated the rate using the latest value (Oct 28, 2011) from the source. Ravensfire (talk) 16:54, 2 November 2011 (UTC)[reply]
Well, it seems to me that all you did was to convert the entire dollar part to zeroes. Wow. Congratulations. Now, 130 crore equals 0 million dollars. What a wonderful edit. AnkitBhattTalk to me!!LifEnjoy 17:16, 2 November 2011 (UTC)[reply]
Tch tch, you are making no attempt to hide the sarcasm; keep it cool guys, the world is a better place without our heads being hot ;) Lynch7 17:18, 2 November 2011 (UTC)[reply]
Though we'd probably appreciate it if Ravensfire hurries up on whatever he's doing to rectify the error, its affecting a hell lot of articles. Lynch7 17:21, 2 November 2011 (UTC)[reply]
Never mind,  Done now. Updated the rupee value as 49.312 per dollar. Lynch7 17:24, 2 November 2011 (UTC)[reply]
Thanks for correcting this, MikeLynch. My apologies, I was pulled away after saving the new rate in one page and before I could test it. Ravensfire (talk) 17:33, 2 November 2011 (UTC)[reply]
No problemo, just be careful with templates next time, it affects lots of articles. Lynch7 17:40, 2 November 2011 (UTC)[reply]
Will do - pretty embarrassed about this one. Ravensfire (talk) 17:43, 2 November 2011 (UTC)[reply]
Thank you Mike for correcting thsi easily-avoidable mistake. And by the way, where are you? You seem to have disappeared from Ra.One. The way the article is going, I am forced to quote this :- "The more the merrier" (though I find it cheesy). Please help me out in shortening the plot section. The way I'm writing out the plot, it looks like an Avatar article in itself! AnkitBhattTalk to me!!LifEnjoy 18:02, 2 November 2011 (UTC)[reply]
Its hard to work on big articles, and it needs a lot of energy—something which I am lacking these days ;) You guys seem to be doing just fine, keep up the good job! Lynch7 18:13, 2 November 2011 (UTC)[reply]
Dude! That's not the response I expected :P. BTW, did you actually see Ra.One? AnkitBhattTalk to me!!LifEnjoy 13:46, 3 November 2011 (UTC)[reply]
[edit]

Why is the old abbreviation (Rs.) still used instead of the currency sign when nolink is turned on? Also, why are million and billion denominators used on a majority of articles instead of crore? Is this WP policy or just because most people don't understand the Indian numbering system? — Preceding unsigned comment added by 67.160.116.66 (talk) 12:09, 20 April 2012 (UTC)[reply]

According to the relevant WP policy, the Indian numbering system should be used. Hack (talk) 02:32, 30 August 2012 (UTC)[reply]
I would guess that the subpage for non-linking was overlooked when the new symbol came in. I have fixed this. As noted above, for India-related articles the guideline (not policy) is to use crore and lakh, which, no, most people don't understand (but this is not the place to debate that). The template allows for this. It also allows for millions, billions and trillions, which is reasonable since the template may be used on articles without a strong enough tie to India to warrant these terms. JIMp talk·cont 16:28, 19 March 2013 (UTC)[reply]

Unicode symbol

[edit]

Please consider using the unicode symbol for rupee rather than the image file. 55 (66¢ US) ₹55, and consider linking the rupee symbol to it's page. 129.118.165.192 (talk) 21:04, 26 December 2012 (UTC)[reply]

There seems to be a few problems at the moment with this symbol until they're sorted out it might be best to stick with the template {{Indian rupee}} call. JIMp talk·cont 16:58, 19 March 2013 (UTC)[reply]

False precision

[edit]

Currency translation ought to be just sufficient for readers to appreciate the order of magnitude. I don't know what degree of rounding takes place, but looking at the examples, and the fluctuation in currencies over any period of time, it seems that we ought to default to a number of sf in rounding at one or perhaps two notches lower than it is at present. -- Ohconfucius ping / poke 06:48, 19 March 2013 (UTC)[reply]

I've marked the request as answered, as the template is only semi-protected and you should be able to edit it yourself. If you want help with template coding, you might try asking at Wikipedia:WikiProject Templates or at WP:VPT. Best — Mr. Stradivarius ♪ talk ♪ 07:07, 19 March 2013 (UTC)[reply]
Too many significant figures give false precision, especially with the way currencies fluctuate, too few can give you an inaccurate conversion. I've rewritten the template making the default to be two significant figures, I reckon that's about just right. JIMp talk·cont 16:39, 19 March 2013 (UTC)[reply]

Rewrite

[edit]

I have rewritten the template. There are a few changes.

  1. As noted above, the strange space after the rupee sign when dealing with billions of rupees is gone.
  2. As noted above also, the new rupee sign, ₹, is used whether you're linking or not.
  3. Again as noted above, the the rupee sign is now linked (except, of course, when linking is off).
  4. "Lakh" is also now linked.
  5. The cent sign has been delinked. Per WP:CONTEXT this should not be linked. Perhaps it was linked to clarify that they were American cents. It's better style to avoid using links for clarification. Now a "US" is there instead.
  6. The "less than 1¢" stuff has been got rid of. 45 paise is less than 1¢, 20 paise is less than 1¢, 7 paise is less than 1¢, 1 paise is less than 1¢ ... This doesn't tell us much. Now we have actual conversions for things less than one cent.
  7. It used to be that anything less than one rupee would be converted to cents (with only three options: 2¢, 1¢ and less than 1¢) and anything more than or equal to one rupee would be converted to dollars but one rupee is only worth about a couple of cents so cents were being very underused. Now anything less than a dollar is converted into cents, e.g. ₹30 is converted to 55¢ rather than $0.55.
  8. Wrapping between the rupee value and the dollar conversion is now allowed for.
  9. There was a quirk in the old code that converted values from ₹4.3699 crore (₹4.3 crore with nolink=yes) to $1,000 million dollars to millions of dollars even though ₹4.3699 crore is less than a million dollars. This only occurred which crores, e.g. {{INRConvert|5|c}} would convert to millions of dollars but {{INRConvert|50|m}} would convert just to dollars, so there was inconsistency there. It was probably an old exchange rate which got fossilised in the template code. This is gone.
  10. The default rounding is now to two significant figures as discussed above.
  11. There are now two digits after a decimal point which separates dollars and cents (unless you ask for more).
  12. Parameter 3 still gives the optional rounding factor but now it works of cents too.

JIMp talk·cont 18:22, 19 March 2013 (UTC)[reply]

Two new parameters have been added.

  1. The parameter year accounts for inflation.
  2. The parameter to allows for conversion to other currencies besides US (combinations are also possible).

JIMp talk·cont 15:11, 22 March 2013 (UTC)[reply]

Pluralisation

[edit]

There seems to be some disagreement about how to pluralise. Until April the template did not pluralise anything. Raghusri did the honours of fixing this problem. I thank you, Raghusri, for that, however, I have two problems with the way you approached this.

  • Adding "(s)" (as in "paise(s)") is okay when we don't know how many of the thing we are dealing with but in this case we do. It's much better style to add "s" (no brackets) if and only if we have a number that is not one (ignore negative numbers). We can do this. For example, if <nowiki>{{{1}}}</nowiki> is the number of rupees, the code <nowiki>{{#ifexpr:{{{1|0.01}}}!=0.01|s}}</nowiki> can be used to add "s" whenever we have more than one paise.
  • I don't agree that the words "thousand", "lakh", "million", "crore", "billion", etc. should be pluralised here. 3,000 is three thousand rupees. It's rupees which you have more than one of, pluralise "rupee" not "thousand" (but, of course, we don't need to pluralise a symbol).
code current version sandbox version Raghusri's version my version
{{INRConvert|0.01}} 1 paisa (0.012¢ US) 1 paisa (0.012¢ US) 1 paise(s) (0.018¢ US) 1 paise (0.018¢ US)
{{INRConvert|0.05}} 5 paise (0.060¢ US) 5 paise (0.060¢ US) 5 paise(s) (0.092¢ US) 5 paises (0.092¢ US)
{{INRConvert|0.20}} 20 paise (0.24¢ US) 20 paise (0.24¢ US) 20 paise(s) (0.37¢ US) 20 paises (0.37¢ US)
{{INRConvert|1}} 1 (1.2¢ US) 1 (1.2¢ US) 1 (1.8¢ US) 1 (1.8¢ US)
{{INRConvert|30}} 30 (36¢ US) 30 (36¢ US) 30 (55¢ US) 30 (55¢ US)
{{INRConvert|1|k}} 1,000 (US$12) 1,000 (US$12) 1,000 (US$18) 1,000 (US$18)
{{INRConvert|30|k}} 30,000 (US$360) 30,000 (US$360) 30,000 (US$550) 30,000 (US$550)
{{INRConvert|1|l}} 1 lakh (US$1,200) 1 lakh (US$1,200) 1 lakh(s) (US$1,800) 1 lakh (US$1,800)
{{INRConvert|3|l}} 3 lakh (US$3,600) 3 lakh (US$3,600) 3 lakh(s) (US$5,500) 3 lakh (US$5,500)
{{INRConvert|1|m}} 1 million (US$12,000) 1 million (US$12,000) 1 million(s) (US$18,000) 1 million (US$18,000)
{{INRConvert|3|m}} 3 million (US$36,000) 3 million (US$36,000) 3 million(s) (US$55,000) 3 million (US$55,000)
{{INRConvert|1|c}} 1 crore (US$120,000) 1 crore (US$120,000) 1 crore(s) (US$180,000) 1 crore (US$180,000)
{{INRConvert|10|c}} 10 crore (US$1.2 million) 10 crore (US$1.2 million) 10 crore(s) (US$1.8 million) 10 crore (US$1.8 million)
{{INRConvert|1|b}} 1 billion (US$12 million) 1 billion (US$12 million) 1 billion(s) (US$18 million) 1 billion (US$18 million)
{{INRConvert|30|b}} 30 billion (US$360 million) 30 billion (US$360 million) 30 billion(s) (US$550 million) 30 billion (US$550 million)
{{INRConvert|1|t}} 1 trillion (US$12 billion) 1 trillion (US$12 billion) 1 trillion(s) (US$18 billion) 1 trillion (US$18 billion)
{{INRConvert|30|t}} 30 trillion (US$360 billion) 30 trillion (US$360 billion) 30 trillion(s) (US$550 billion) 30 trillion (US$550 billion)

My version is currently in the sandbox. JIMp talk·cont 06:04, 16 May 2013 (UTC)[reply]

Yeah! First of all i thank you for opening a discussion, because many users are not doing this, rather than they are engaging in edit war. It's nice to see. What you said is right. According to the above two points, do as your wish. Carry on :) Regards, Raghusri (talk) 09:29, 17 May 2013 (UTC)[reply]

It is always best to discuss, edit warring is a dead-end. I'm going ahead & putting the sandbox version onto the page. It was good to have this chat. JIMp talk·cont 04:01, 18 May 2013 (UTC)[reply]

Paise is already plural, like the British pence. The singular form is paisa. --Joshua Issac (talk) 14:05, 4 June 2013 (UTC)[reply]
Thanks for the info. The template should probably be fixed to cover this. JIMp talk·cont 08:00, 5 June 2013 (UTC)[reply]

Comma in the year

[edit]

The template at present displays "2,013" as the year. Is it possible to have it display without the comma, ie: "2013" ? - Sitush (talk) 16:06, 5 August 2013 (UTC)[reply]

It looks like the sandbox version might be working correctly. I'm heading off for a bit so I can't really look at the differences between the current live version and the sandbox but I can check when I get back. In the meantime, would you mind looking at the sandbox to see if that output looks correct? Ravensfire (talk) 16:11, 5 August 2013 (UTC)[reply]
Sorry, I had already tried {{INRConvert|3750|c|year=2001|to=USD EUR GBP}} in the sandbox and it produced the same odd format there. It was remiss of me not to mention this. - Sitush (talk) 16:19, 5 August 2013 (UTC)[reply]
Gah, I'm an idiot. I should have pointed you towards the testcases page which shows how the main template appears and how the version in the sandbox appears using the same inputs. There are some differences between the two pages but I think the sandbox version is showing the year correctly in the various possible configurations. Take a look at that testcases page and see what you think. Ravensfire (talk) 17:40, 5 August 2013 (UTC)[reply]
From a quick look, I think the problem is the template is trying to format the year as it would a currency amount, hence the , after the 2 in 2013. Assuming I'm right, it's "just" a case of finding that spurious conversion and removing it from the template code. That's easier said that done, alas, but definitely doable with some time. Probably not something I can do today but by tomorrow or Wednesday. I compared the main template code and the sandbox code and there are a fair number of differences that I think were intended to simplify / improve the performance of the template. Without a significant review, I'm quite leery about just copying the sandbox over to the main template. Alas, that would be a simple fix if there was only the single change but it's more than that. Ravensfire (talk) 17:46, 5 August 2013 (UTC)[reply]
I wondered whether it was a currency format issue but there is no way that I am messing about with templates. My typo rate is rocketing at the moment - dodgy keyboard, even more dodgy meds. If you or someone else can find the time to hunt this one down and fix it then it would be appreciated. OTOH, leaving it as it is will not stop the world from spinning. - Sitush (talk) 17:55, 5 August 2013 (UTC)[reply]
Fixed. Jimp 09:24, 7 August 2013 (UTC)[reply]
Thanks very much. Wikipedia's "customer service" shines again. - Sitush (talk) 10:22, 7 August 2013 (UTC)[reply]

Spam?

[edit]

Okay I don't know much about templates but yesterday while patrolling I came across this in the Indian railways page. For about 20 minutes in this template's output "{{INRConvert|1}} || 1 (1.2¢ US) ", there was an 'USD' term and it was an external link to http://www.filmznews.com/! It was restored back to normal but I have no idea what happened, couldn't find anything and the history section of this template (and the article) is undisturbed. Anybody else noticed this and can explain? It happened around 18:30 UTC 17 August. -Ugog Nizdast (talk) 17:38, 18 August 2013 (UTC)[reply]

it was reverted here. Frietjes (talk) 19:07, 18 August 2013 (UTC)[reply]
So that's where it was, that too for a day...thanks for your help. -Ugog Nizdast (talk) 19:22, 18 August 2013 (UTC)[reply]

New variant based on this template

[edit]

Would it be possible to create a new template based on a stripped-down version of this? What is required is something that converts between the Western (million etc) and Indian (crore etc) counting systems. No need for inflation, currency symbols/conversion etc - just plain numbers. The purpose is to attempt avoidance of problems that occur in relation to MOS:TIES when using the relatively unfamiliar Indian system - too many people are tempted to remove commas from valid numbers such as 1,00,00,000. - Sitush (talk) 05:26, 5 October 2013 (UTC)[reply]

could extend {{INR}} to do this, just have to cleanup the use of the undocumented |1=, which is probably not widely used. once that is done, it would be a simple extension. Frietjes (talk) 17:07, 5 October 2013 (UTC)[reply]
I might be missing something here but {{INR}} seems just to add the currency symbol for a rupee. What is needed is a conversion function that accepts a number in western format and returns one in Indian crore or lakh format. And and vice versa.

1 crore is 100 lakh and 1 lakh is 100,000 (but they'd write 100,000 as 1,00,000). Imagine a template like this:

  • {{INumConvert|1|crore|decimal|abbreviation=on|wikilink=on}} would produce the string "1 crore (10 million)"
  • {{INumConvert|10,000,000|decimal|crore|abbreviation=on|wikilink=off}} would produce the string "10m (1 crore)"
  • {{INumConvert|10|lakh|decimal|abbreviation=off|wikilink=on}} would produce the string "10 lakh (1 million)"
Sure, having the ability to turn on/off the rupee symbol would be a bonus but {{INR}}it can be prefixed anyway. These figures are used a lot in non-finance situations, eg: population, attendance at protests etc (yep, they have a lot of protests and a lot of people attend!) I'll have to find an example of where the extended strings (1,00,00,000 etc) appear but they do and they have caused issues. - Sitush (talk) 18:07, 5 October 2013 (UTC)[reply]
I'm not explaining this very well - let me have a think. - Sitush (talk) 18:08, 5 October 2013 (UTC)[reply]
I thought you were asking for a variant of this template that produces the first part, but without the conversion in parenthesis, but perhaps you are asking for something else? yes, the {{INR}} template only does one thing at the moment, which is why I suggested extending it to do more. Frietjes (talk) 16:10, 6 October 2013 (UTC)[reply]
I think that such a template would be a great idea. In fact, we could have three subtemplates:
  • {{INSConvert}}, which would convert between short scale, long scale and the Indian numbering system, e.g. lakh to million or vice versa
  • {{INRInflation}}, which would calculate the inflated value in a particular year, given the value in a previous year, e.g., 500 in 1998 was equivalent to ??? in 2002
  • a variant where it would convert it into another currency, and display the inflated value based on the inflation of that currency (which may be more relevant in some contexts).
Then {{INRConvert}} could transclude those templates, which would also make the code a bit more modular and hopefully easier to maintain. --Joshua Issac (talk) 01:35, 28 April 2014 (UTC)[reply]
{{Inflation}} already calculates the inflated value in a particular year given the value in a previous year for various currencies including the Indian rupee. {{INRConvert}} does transclude {{Inflation}} to inflate a value before converting it.
As for the South Asian style of placing commas, this is not valid on WP according to WP:MOSNUM.
A template to convert between "lakh"/"crore" and English seems a little useless. In general it would merely serve to add unnecessary clutter. Just use the words English speakers in general are familiar with, i.e., don't use "lakh" and "crore". In the rare case where "lakh" and/or "crore" would be appropriate, just convert by hand. Using lakh and crore on {{INRConvert}} is a bit of an exception since the whole thing is converted into dollars (pounds, euros, etc.) so the clutter is there anyway.
Note that {{INSConvert}} in its current form isn't that template but a number reformatter ... which has lain idle for almost a year and should be deleted on ground of being unuseful. Jimp 14:40, 26 May 2016 (UTC)[reply]

Incorrect conversion

[edit]

{{INRConvert|90|l|year=2013}} provides an inflated value of 1.9 crore that is not correct. It should give 90 lakh. Example: 90 lakh (equivalent to 1.5 crore or US$180,000 in 2023). --Joshua Issac (talk) 19:07, 29 November 2013 (UTC)[reply]

Does anyone have any ideas on what might be causing this? Could it be Template:Inflation/IN/dataset? --Joshua Issac (talk) 02:53, 3 April 2014 (UTC)[reply]
Fixed. Jimp 08:22, 3 April 2014 (UTC)[reply]
Thanks. --Joshua Issac (talk) 14:48, 4 April 2014 (UTC)[reply]
The inflated value for crore seems to be ten times what it should be; {{INRConvert|90|c|year=2013}} produces 90 crore (equivalent to 900 crore or US$15 million in 2014) [e.g. 90 crore (equivalent to 153 crore or US$18 million in 2023)]. It works correctly for lakh, trillion, etc. --Joshua Issac (talk) 15:03, 5 April 2014 (UTC)[reply]
Now it says: 90 crore (equivalent to Bad rounding hereFormatting error: invalid input when rounding or US$Bad rounding hereFormatting error: invalid input when rounding in 2014})].
I've copied the table below from the section below and changed the arguments to the currency_formatting parameter to show which arguments are causing the problematic output:
Input Output
{{INRConvert|75|l|year=2013}}

75 lakh (equivalent to 1.3 crore or US$150,000 in 2023)

{{INRConvert|75|c|year=2013}}

75 crore (equivalent to 127 crore or US$15 million in 2023)

{{INRConvert|75|c}}

75 crore (US$9.0 million)

{{INRConvert|75|lc|year=2013}}

75 lakh crore (equivalent to 130 trillion or US$1.5 trillion in 2023)

The lakh and lakh crore formats are fine, but the template does not like it when the argument is c. --Joshua Issac (talk) 11:08, 8 April 2014 (UTC)[reply]
Fixed by adding a missing closing }. --Joshua Issac (talk) 11:36, 14 April 2014 (UTC)[reply]
The conversion issue was fixed by correcting the divisor exponents at Template:INRConvert/inflation/b. It had been 6, when it should have been 7. --Joshua Issac (talk) 19:24, 18 April 2014 (UTC)[reply]

Lakh Crore

[edit]

Firstly its a great template, thanks. Now coming to a small issue, the total planned expenditure of Govt of India for Defense services for year 2013 was 2.03 lakh crore (see 2013 Union budget of India) but template conversion do not support such nomenclature, it supports 'Trillion' but not 'Lakh Crore' though both are same (1 trillion equals 1 lakh crore) but later is the term used in India when talking about huge sums of money. Can we have 'Lakh Crore' as another optional currency_formatting parameter. Thanks. IndianGeneralist 12:03, 19 February 2014 (UTC)

Done. Jimp 07:53, 25 February 2014 (UTC)[reply]

Formatting error occurs

[edit]

Could somebody solve this issue?

Input Output
{{INRConvert|75|k|year=1931}}

75,000 (equivalent to 23 million or US$270,000 in 2023)

{{INRConvert|75|k|year=1952}}

75,000 (equivalent to 8.1 million or US$97,000 in 2023)

{{INRConvert|75|k|year=1953}}

75,000 (equivalent to 7.9 million or US$95,000 in 2023)

I think the problem is the dataset used for inflation starts at 1953. It can't handle converting anything from before that year. Sorry. Ravensfire (talk) 15:56, 4 April 2014 (UTC)[reply]
@Ravensfire: Hope you tried your level best. Thanks for putting in effort. I hope somebody could address the issue. --βα£α(ᶀᶅᶖᵵᵶ)(Support) 18:18, 4 April 2014 (UTC)[reply]
@Jimp: could probably fix it, just need to check to see if year is greater than the value returned by {{Inflation/IN/startyear}}. Frietjes (talk) 18:52, 4 April 2014 (UTC)[reply]
Hmmm, wonder what to display if the year is earlier? Probably just skip that entire section, I guess. Plus add to the documentation what will happen if you put a year that's too early. Ravensfire (talk) 19:39, 4 April 2014 (UTC)[reply]
The best solution, of course, would be to add years before 1953 but in the meantime (or failing that altogether) it would probably be best to just ignore these (as suggested). Jimp 09:39, 7 April 2014 (UTC)[reply]
I tried to find the data on the site mentioned in the dataset, but nothing. I'll see what I can find (and noticed that the change you made looks for the startyear, not hardcoded). The challenge is the dataset put 1953 at 100. Ravensfire (talk) 02:16, 8 April 2014 (UTC)[reply]
I'm not sure what you mean by "The challenge is the dataset put 1953 at 100." Jimp 10:20, 8 April 2014 (UTC)[reply]
With most inflation datasets, some date is picked as the base and set to 100. That's often the first year of the dataset. So I may be able to find another inflation dataset but if it uses different values it will take some testing to see if it works. That was the point I was trying (poorly) to make. Ravensfire (talk) 14:56, 8 April 2014 (UTC)[reply]
If I'm reading Indian rupee right, the earliest possible date for the start year for inflation should be 1835. Do we have a dataset going back that far? Even if not, we could probably reconstruct it based on various sources like [1]. --Joshua Issac (talk) 15:58, 8 April 2014 (UTC)[reply]
Okay - I'll take a look there this evening. Thanks for finding that! Ravensfire (talk) 16:04, 8 April 2014 (UTC)[reply]
@Ravensfire, @Frietjes, @Jimp & @Joshua Issac: Any progress in this issue pals? --βα£α(ᶀᶅᶖᵵᵶ)(Support) 23:21, 11 May 2014 (UTC)[reply]

I am not sure about the others, but I have not made any progress on this, I am afraid. --Joshua Issac (talk) 15:56, 18 May 2014 (UTC)[reply]

Crore and Lakh instead of million and billion

[edit]

Please use Crore and Lakh instead of million and billion when the amount is in Indian Rupee as Indians are more familiar with the former.nijil (talk) 19:11, 11 May 2014 (UTC)[reply]

Wikipedia isn't written especially for Indians (nor for Pakistanis, Bangladeshis nor Nepalis) even articles written about South Asian topics should be accessible to a general audience. If you can read English to a decent level, you'll know what a million, billion, etc. is, but most don't understand what lakhs or crores are. Jimp 05:34, 15 October 2015 (UTC)[reply]
Non indians, as I, may not understand Crore or Lakh, but they understand the converted value. And Crore or Lakh are linked. --Robertiki (talk) 04:20, 6 April 2016 (UTC)[reply]
Actually this is not an issue with the template at all. The template allows the user to choose crore/lakh or million/billion for the input. It doesn't force one or the other but gives editors the freedom to determine which is more appropriate for the article. If it were forcing one or the other, though, it would be better to choose the more widely understood English words over Hindi ones, but it isn't. Jimp 14:04, 26 May 2016 (UTC)[reply]
it would be better to choose the more widely understood English words over Hindi ones
Lakh and crore are English words. —Wiki Wikardo 11:15, 21 February 2017 (UTC)[reply]
Wikipedia isn't written especially for Indians (nor for Pakistanis, Bangladeshis nor Nepalis)
Nor is it written especially for Americans, Australians, Nigerians or Norwegians. Lakh and crore are perfectly valid words. The average American won’t know what a bakkie or pram is, but that doesn’t mean articles dealing with South African or British topics should be rewritten to cater to them (I’m curious who, exactly, you imagine a “general” audience to consist of).
Obviously international terms are preferred, but Indian English is as valid a variety as any other, and I’d think WP:TIES is relevant here. I would greatly appreciate the option to denominate the converted-to currency in lakhs or crores. —Wiki Wikardo 11:15, 21 February 2017 (UTC)[reply]
What Jimp (talk · contribs) said is actually incredibly patronising, but it is symptomatic of the bias against India in Western circles. Wikipedia does not exist to serve the cultural sensibilities of Western readers. Articles on WP:IND are written in Indian English - this is explicitly stated on almost every talk page of India-related articles. An encyclopaedia is, after all, for documenting things as they are - if they cannot understand the nomenclature used in other countries, they should make an effort to learn it. cc: Wiki Wikardo (talk · contribs) | Tiger7253 (talk) 13:51, 7 March 2017 (UTC)[reply]


I have nothing against India or its people. It has nothing to do with serving cultural sensibilities; it's a matter of comprehensibility. Sure, absolutely, write in Indian English where appropriate but "million", "billion", etc. are valid in Indian English, so why not use these terms which we all can understand? Anyway, it's a waste of time arguing this here: the MOS is clear on this point.

Prefer vocabulary common to all varieties of English. Insisting on a single term or a single usage as the only correct option does not serve the purposes of an international encyclopedia.

Jimp 06:08, 9 March 2017 (UTC)[reply]

That particular example about ten million vs crore was added to the MoS by a single editor, not by consensus. Either way, when discussing sums of money, lakhs and crores are used almost exclusively, so there is no commonality in using millions and billions instead. ENGVAR suggests using the national variety that is appropriate for the context. --Joshua Issac (talk) 17:19, 6 May 2017 (UTC)[reply]
@Joshua Issac: Do you have any evidence to back up this claim? On the contrary, I've found ample evidence to show that million/billion is (if not equally) popular compared to lakh/crore: Google Trends [2], [3], [4], [5] Getsnoopy (talk) 23:18, 4 November 2019 (UTC)[reply]
Most of the results from the search links above are either from American and British websites using the Indian TLD (e.g. BBC, Business Insider), or talking about non-rupee amounts, e.g. dollars. Searching for "million rupees" vs "lakh rupees" on Google Books returns around 540 results for the first phrase and 1280 for the second, except a very large number of the the first group are British publications from the 20th century, whereas the second group is made mostly of Indian publications. For regular Google Search results (with Verbatim mode to avoid similar terms), there are 140 results for "million rupees" and 95 for "billion rupees"; however, on closer inspection, it turns out that all but a handful them are from American, English and European websites reporting Indian news. Although "lakh rupees" and "crore rupees" only return 163 and 154 results, respectively, most of the websites returned are Indian newspaper and government websites. While use of "million" and "billion" for sums of money is not completely unheard of, the sources using such terminology are more often than not American or British, and such usage is not common enough in Indian sources for MOS:COMMONALITY to apply. --Joshua Issac (talk) 23:52, 4 November 2019 (UTC)[reply]
@Joshua Issac: Many news sources employ local journalists to report on local issues in the local variants of English, so just because the parent corporate entity might be headquartered in the US or UK doesn't mean they're bound to follow American/British English. Even if it it did mean that, it's irrelevant since the point is about readership, not where the company is headquartered or what variant of English they're using. That, however, doesn't change that fact that the Google Trends indicate the terms million/billion are far more common than crore/lakh regardless of source, even in India. MOS:COMMONALITY doesn't apply to how common a term is in a particular variant in English, it applies to English as a whole. Million/billion is far more common in English than crore/lakh, so per COMMONALITY, those terms are preferred. The goal is accessibility to a global readership, not to a regional subset of it. Getsnoopy (talk) 21:55, 6 November 2019 (UTC)[reply]
They are not bound to follow American/British English, but they do in practice; nothing on bbc.in is in Indian English, for example. MOS:COMMONALITY does not override MOS:TIES (which it would if it applied to the language as a whole), for otherwise we would not have British English anywhere on Wikipedia, since American English is used by five times as many people. If you want to change the guidelines so that COMMONALITY does override TIES, then this page is the wrong place to discuss it. As it stands, MOS:COMMONALITY favours usage that is common to both the variety favoured by MOS:TIES and to other varieties of English. When no such commonality exists, the term in the national variety tied to the subject should be used (since only TIES would apply). If local sources are almost never using "million" and "billion" to denominate sums of local currency, then there is no commonality, especially when such usage would seem jarring to a local. --Joshua Issac (talk) 23:04, 6 November 2019 (UTC)[reply]
@Joshua Issac: Indian English, Australian English, New Zealand English, and South African English is basically indistinguishable from British English, and the sum of those people outnumber American English speakers. Regardless, COMMONALITY is not merely to do with sheer number of speakers, but distribution, prevalence, etc.; if it was, you'd be correct. "When no such commonality exists, the term in the national variety tied to the subject should be used (since only TIES would apply)"—Where did you read that? Besides, using crores/lakhs is explicitly discouraged except in rare cases where it is done for "contextually important reasons" in MOS:NUMS, and even then numerical representations are still to use 3-digit groupings. All of this notwithstanding, I think you're focused on the case of crores/lakhs being used when dealing specifically with Indian rupees. This, however, ignores the fact that references to all other currencies still use denominations in millions/billions by the very same sources you're referring to, which is evident in the Google Trends statistics. So it's not like the words million/billion are alien to Indian English, and therefore (as per your argument), COMMONALITY suggests that they be used instead of ones specific to Indian English which are completely alien to the rest of the world. Getsnoopy (talk) 00:23, 9 November 2019 (UTC)[reply]
If Indian English is indistinguishable from British English, then how could Indian English words be "completely alien" to the rest of the world? (which they are not, since other South Asian regional varieties of English have the same words). Of course, COMMONALITY is not merely to do with sheer number of speakers, but about usage common to different varieties. MOS:SPELL09 specifically talks about how to use the regional terms for local currency amounts. I never said that other currencies should use lakh/crores. In fact, I specifically pointed out dollars as an example where millions/billions are used, since such usage accounted for almost all of the results from the search links you posted. I also see that this exact thing is being discussed at Talk:Tiger Zinda Hai#Rupee to Dollar Conversion as well, with more participants, so it is better to keep the discussion there instead of splitting it across different pages. --Joshua Issac (talk) 00:57, 9 November 2019 (UTC)[reply]
@Joshua Issac: Hence the word "basically"; if there were no differences, it would just be called British English outright. That's the same policy I was pointing out that discourages crore/lakh. But sounds good, let's discuss there. Getsnoopy (talk) 23:55, 9 November 2019 (UTC)[reply]

Overlinking

[edit]

I propose to change the default such that the template does not link automatically but links would have to be specified. When used several times in an article, this template produces a huge number of redundant links unless editors take the time to add the extra code to turn them off. Jimp 05:34, 15 October 2015 (UTC)[reply]

The parameter nolink has been replaced by lk. The new parameter allows more versatility, e.g. now you can link the rupee symbol and not the word "lakh" or vice versa. Jimp 15:26, 26 May 2016 (UTC)[reply]

Help

[edit]

I noticed that the conversion does not work after year 2013 (check values here). Can someone please look into this? Thanks, Arun Kumar SINGH (Talk) 20:21, 23 May 2016 (UTC)[reply]

You'll need to update Template:Inflation/IN/dataset to include years after 2013. I don't know a source for the required inflation data, though. Huon (talk) 21:13, 23 May 2016 (UTC)[reply]

When year is the current year

[edit]

I recently noticed an oddity created by this template on RLV-TD. This is a new article which transcludes this template. The year parameter was set to 2016 ready for future inflation. The problem was that it was inflating the 2016 figure to a 2016 figure and then converting. Of course, that's a 0% increase in zero years but the rupee figure was still given twice. So, we had "₹95 crore (equivalent to ₹95 crore or US$14.1 million in 2016)". There's no need to add inflation if year is the current year. In this example, the output should simply be "₹95 crore (US$14.1 million)" untill next year. This has been fixed. Jimp 15:05, 26 May 2016 (UTC)[reply]

Feature proposal

[edit]

Hey, not sure who's running this ship anymore, but if nobody responds soonish, I'll just ask someone at the Village Pump. The |year= parameter allows us to use this template and adjust for inflation, but there's a growing dispassion for the forced conversion of Indian Rupees to US Dollars. Is there any way to set a switch to turn off the US conversion? Currently:

{{INRConvert|180|c|year=1990}}

yields

180 crore (equivalent to 18 billion or US$210 million in 2023)

I'm proposing we do something like:

{{INRConvert|180|c|year=1990|US=no}}

to produce

₹180 crore (equivalent to ₹12 billion in 2016)

Previous discussions about the utility of INRConvert in Indian film articles has come up here and here, and some editors feel the US conversion promotes US bias, and the default output for the inflation conversion is needlessly verbose. So there is some community need behind my request.

And as a general note, if the input is in crore, maybe the output should be in crore as well, and if the input is millions or billions, the output should be in millions or billions.

Thanks in advance, Cyphoidbomb (talk) 02:18, 9 May 2017 (UTC)[reply]

This is controlled by the to parameter, whose default argument is USD. What we need is a none argument for this parameter that results in no conversion. --Joshua Issac (talk) 17:09, 15 May 2017 (UTC)[reply]
To add to that, I do not support removing the converted US dollar amount in general (because the guidelines say that we need to have a converted amount to a well-known currency if the amount is not in one), but I can see that there are cases where it necessary to have the amount only in Indian rupees (for example, if the converted amount is in another column). This is not about being US-centric, as other major currencies such as the euro are also appropriate for this. --Joshua Issac (talk) 17:21, 15 May 2017 (UTC)[reply]
Hi Joshua Issac, I appreciate your feedback. The population of India is about 1.3 billion, or 1/6 of the global population. I would argue that makes the Indian Rupee quite well-known, far moreso than the Swedish Kroner example used at WP:$. (Population of Sweden is 9.8 million). That said, I'm not proposing the removal of any functionality. I'm proposing: allow users to suppress the conversion to another currency, while still allowing for the inflation calculation in rupees. The practical application of this is at List of highest-grossing Indian films. If an editor wants to add an "Adjusted for inflation" column, we're going to have two columns needlessly bloated by US dollar conversions. Another example might be here. If you look in the budget/gross parameters of the infobox, that's an awful lot of information to display in a small space. The second thing I'm proposing, is that if the input value is in "crore" (1 crore of apples = 10,000,000 apples) then the output value should be in crore, not in millions/billions. If the input value is in millions/billions, the output should be in millions/billions. This is for basic parallel structure. Regards, Cyphoidbomb (talk) 15:19, 24 May 2017 (UTC)[reply]
Looking at this again, I believe you can use {{Inflation}} to handle this issue without the need for conversions. If you want to inflate 10 crore rupees with the Inflation template, supply just 10 to it and add crore after the template, instead of using this template.
As for including a converted amount, it is not just about population of the country that issues the currency, but who else uses it as well, internationally. {{Most traded currencies}} shows that the Swedish crown is traded twice as much by value as the Indian rupee. So if even the Swedish crown requires conversion, then the Indian rupee requires it as well, since it would be even less familiar to the average reader than the crown. This is why the manual of style says converted figures should be provided. --Joshua Issac (talk) 08:32, 25 May 2017 (UTC)[reply]

Request: Implement minus sign for negative numbers

[edit]

Greetings and felicitations. Would it be possible to implement a leading minus sign (−) for negative numbers? E.g., "−₹17,318 million (−US$250 million)" (Airltel's 2019 operating income.) —DocWatson42 (talk) 04:32, 26 July 2019 (UTC)[reply]

@Getsnoopy, Joshua Issac, Stepho-wrs, and WhisperToMe: ("Recent" editors): Hello? (As the template now stands the output is "₹ −17,318 million (US$ −250 million)".)—DocWatson42 (talk) 14:17, 16 August 2020 (UTC)[reply]
To implement this, we should check if the supplied number is less than 0. If so, we should:
  1. multiply it by -1 before further calculations
  2. prepend a minus sign to the INR signs and the foreign currencies
It is easy to add this to the historical mode. Might be slightly more difficult for regular mode. How are you planning on using this? --Joshua Issac (talk) 16:40, 16 August 2020 (UTC)[reply]
I'm not sure which is the preferred way. Has anybody asked at MOS:CURRENCY which side the negative sign should go on? What happens when we have a range of negative numbers? eg ₹-5 - ₹-10  Stepho  talk  21:52, 16 August 2020 (UTC)[reply]
Looks a there is already a discussion at Wikipedia talk:Manual of Style/Dates and numbers#Request for information/to add a currency format example.  Stepho  talk  23:50, 16 August 2020 (UTC)[reply]

Historical conversion

[edit]

When displaying a rupee amount from the past, it may sometimes be desirable to show a converted figure in a different currency using the contemporary exchange rate. For example, a company that earned 50 lakh in 1947 might say "50 lakh (US$5 million)", where the foreign currency amount uses the exchange rate from 1947. Uncluttered output might be needed for infoboxes, or where there are many conversions. I have created two parameters called fmt and round. Currently, fmt will accept an argument historical, which will change the output format to the one above even when a year is supplied; if fmt is not supplied, it will follow the existing behaviour (showing the "equivalent to" text). The round parameter accepts an integer argument for the number of decimal places to which to round (negative numbers will round to the nearest 10, 100, etc.).

Here is an example:

  • Code: {{INRConvert/sandbox|100|c|to=EUR|year=2002|fmt=historical|round=-2}}
  • Expected output: ₹100 crore (€21,792,500)
  • Actual output: 100 crore (equivalent to 382 crore or €47 million in 2023)

The code for this is currently in the sandbox. I wrote this feature after reading the discussion at Talk:Tiger Zinda Hai#Rupee to Dollar Conversion. --Joshua Issac (talk) 20:04, 10 November 2019 (UTC)[reply]

The template has been updated (using {{INRConvert/Wordify}}) to condense the target currency amount. --Joshua Issac (talk) 21:33, 10 November 2019 (UTC)[reply]
I don't see the benefit of using negative rounding figures; this is not only unconventional, but it doesn't make sense conceptually. I quite like this parameter, however, and we should incorporate it into the main template as soon as possible. Getsnoopy (talk) 21:14, 12 November 2019 (UTC)[reply]
The feature is now live. Negative figures are needed to round to the nearest 10, 100, 1000, etc. This is because by default, rounding is defined in terms of decimal places after the decimal point (see mw:Help:Extension:ParserFunctions#Rounding). With the use of Wordify, however, it should not really see much use, except in cases where we specifically need a particular precision. --Joshua Issac (talk) 00:05, 13 November 2019 (UTC)[reply]
If the exchange rate from 1947 is used, then the output text should also have "at the 1947 exchange rate" or similar in it. Otherwise the reader will not know if the exchange rate used was from 1947 or the date that the entry was made to the article (editors sometimes look up the current exchange when they edit) or from the date they are reading it.  Stepho  talk  11:21, 13 November 2019 (UTC)[reply]
@Joshua Issac: I see. Also, the feature doesn't seem to be live / working properly. I tried it on an article, and the preview came up with this:

100 million (equivalent to 380 million or US$4.6 million in 2023)

Getsnoopy (talk) 17:42, 13 November 2019 (UTC)[reply]

@Stepho-wrs: It does not show the year because clutter was the main complaint that led to the creation of this feature. INRConvert was banned from film-related lists and infoboxes because of that. The expectation is that the conversion year would be clear from the context, e.g. 2006 film revenues would be converted using 2006 exchange rates.
@Getsnoopy: That happened because a to currency was not specified. This has now been defaulted to USD. --Joshua Issac (talk) 12:05, 16 November 2019 (UTC)[reply]

I have renamed the parameter from fmt to mode, since it changes not just the output format, but the behaviour of the template, and also because there is already a formatting parameter. --Joshua Issac (talk) 12:53, 16 November 2019 (UTC)[reply]

@Joshua Issac: Thanks for that. It seems like the rounding and formatting logic that is built into the regular mode is not available in historical mode. For example, look at these two examples:
  • 20 million (US$240,000) — {{INRConvert|20|m}}
  • 20 million (US$341,309.74) — {{INRConvert|20|m|year=2013|mode=historical}}
It seems like the the comma grouping is not available, and the rounding is not set to a reasonable default (at least, not the same as the one in regular mode). Getsnoopy (talk) 21:56, 16 November 2019 (UTC)[reply]
The regular one implements rounding based on significant figures. The historical mode does not. It defaults to two decimal places instead and relies on the user to specify it if it needs to be different. I agree that rounding based on significant figures is better. There was some reason I could not implement it easily, but do not quite remember what it was. But it should definitely be possible with some work. I had not considered the comma issue. It should be possible to fix that, too, by looking at how the regular one does it. --Joshua Issac (talk) 15:32, 16 August 2020 (UTC)[reply]
Comma grouping has been added. --Joshua Issac (talk) 16:25, 16 August 2020 (UTC)[reply]

Usage of lakh/crore and US/British/Canadian/ANZAC/Irish/etc readers

[edit]

I am aware lakh and crore amounts are deeply ingrained in South Asian Englishes, but WP:ENGVAR also says to use "international" terminology when possible. I wonder if, whenever lakh or crore are used, the template could also display the same amount in US/British numbering before the conversion:

  • 1 lakh (100,000 [Amount in UK/US numbering], [any foreign currency])

WhisperToMe (talk) 14:16, 23 May 2020 (UTC)[reply]

BTW if/when this is done I would like to set it up with Air India Express Flight 812 so the lakh/crore amounts seen in Indian sources are entered as such and automatically converted. WhisperToMe (talk) 00:10, 25 May 2020 (UTC)[reply]
I looked around at Air India Express Flight 812 and decided:
  • 1. I would like to be able to put a range (350-400) in crore and get output in both billion/million and foreign currency.
  • 2. I would like to convert to multiple currencies at once, both USD and euros at a time, for example.
WhisperToMe (talk) 01:11, 25 May 2020 (UTC)[reply]

Expansion depth is huge

[edit]

The expansion depth for a conversion which uses |year=, such as {{INRConvert|250|c|lk=on|year=2018}}, is at least 33. The limit is 40.

Someone who knows what they are doing should look at reducing the expansion depth.

It's already causing Template:Infobox government budget to show up in Category:Pages where expansion depth is exceeded. Thankfully, that's due to the template's documentation, the template itself isn't broken in actual use, nor are pages that use it. Yet. I've put a usage note on that template's documentation page and will put one on this template's documentation page shortly. davidwr/(talk)/(contribs) 18:31, 7 September 2020 (UTC)[reply]

I think the main fault lies with {{Inflation}}. Think there's a commented out workaround in it. I have problems with other templates. Trigenibinion (talk) 23:38, 16 January 2021 (UTC)[reply]

Ranges

[edit]

It would be useful to allow for ranges in this template. For example, in High-speed rail in India, instead of "100 crore (US$12 million) - 140 crore (US$17 million)" it would be clearer to have something like "₹100-140 crore (US$14-20 million)". This can be achieved by giving two values to the template. --Ita140188 (talk) 00:37, 8 September 2020 (UTC)[reply]

Comment by Trigenibinion

[edit]

Please display a link, like crore. Trigenibinion (talk) 22:21, 7 December 2020 (UTC)[reply]

@Trigenibinion: I have moved your comment down, as it didn't seem especially relevant to the 25 May 2020 conversation you were responding to. If you want to show a link, you would format the template like: {{INRConvert|11|c|lk=on}}, which will display as 11 crore (US$1.3 million) Cyphoidbomb (talk) 00:10, 8 December 2020 (UTC)[reply]
Thank you. What about a link for "billion", etc., which are ambiguous? The result value is not being linked. Trigenibinion (talk) 01:26, 8 December 2020 (UTC)[reply]
Billion, in modern parlance, is generally understood to be 1 with 9 zeroes. But if you do the same thing with this template: {{INRConvert|11|b|lk=on}}, it will display as 11 billion (US$130 million), and if you hover your mouse over the billion, (assuming you have a mouse) it clarifies 1,000,000,000. Cyphoidbomb (talk) 01:38, 8 December 2020 (UTC)[reply]
Jumping every 3 zeros is the American way. In general it is 6 zeros. And I was talking about the result, not the original value. Thanks. Trigenibinion (talk) 01:42, 8 December 2020 (UTC)[reply]
@Trigenibinion: "In general" seems to be based on your personal understanding of what "billion" means, vs. what the rest of the globe understands it to mean. Per MOS:COMMONALITY, we strive to use terminology that is understood globally, as opposed to catering solely to people from the Indian subcontinent. That's why we don't write numerals like 1,00,00,00,000, and instead write it the way people from Brazil might understand it: 1,000,000,000. Since your original question was about linking, I think that's been sufficiently explained, right? Cyphoidbomb (talk) 02:07, 8 December 2020 (UTC)[reply]
I too grew up with billion meaning 1 million million. This is typical for countries associated with the British Empire / Commonwealth (such as India and my home in Australia). In the US it means 1000 million. Somehow, the US meaning has become dominant in English speaking countries, even in Britain, Australia and most of the Commonwealth. I don't like it much either but such is life. See billion for more details about long and short billion.  Stepho  talk  02:21, 8 December 2020 (UTC)[reply]
6 zeros is the general way in multiple European languages. I am not saying that the conversion should follow that, rather that the result should also have a link to clarify that the American way is being used for people who are not so familiar with English. Only the source value is being shown with a link. Trigenibinion (talk) 02:26, 8 December 2020 (UTC)[reply]
When the |b parameter is used then you get a tooltip that says "1,000,000,000" when your mouse hovers over "billion" and a blue link to the 1,000,000,000 article.  Stepho  talk  03:08, 8 December 2020 (UTC)[reply]
I am using crore, I want a link also in the resulting billion. Trigenibinion (talk) 03:22, 8 December 2020 (UTC)[reply]
@Trigenibinion: If your suggestion is to always include a clarification wikilink when using "billion" (or crore or lakh or whatever), I'd disagree with that. Per our general linking guidelines, we should be cautious about overlinking. If you want to activate a link for the first appearance of "crore", which may not be understood by the majority of the world, or billion, which could be ambiguous in some lands, there might be a reasonable argument to include a link or links, but that would be something you would do once or twice, not something that should be done every time we use these summary labels. So now that you've been taught how to activate links, does that resolve your concern? Also, per MOS:COMMONALITY, we probably shouldn't be using crore anyway, since it is not universally understood, and we should be using millions/billions instead. Remember, please, that this is the English Wikipedia, and not the Indian Wikipedia, so we should be aiming to communicate to the widest English-speaking readership, even when the article is about an Indian subject. Regards, Cyphoidbomb (talk) 03:33, 8 December 2020 (UTC)[reply]
There could be a different parameter to activate clarification on the result value. I have not seen how to do this. This is precisely about communicating with most people than can read some English. Trigenibinion (talk) 03:58, 8 December 2020 (UTC)[reply]
It already has a tool tip showing "1,000,000,000" and a link to 1,000,000,000. Not sure how much more clarification you need.  Stepho  talk  05:51, 8 December 2020 (UTC)[reply]
I have updated the documentation to show you the problem. Trigenibinion (talk) 09:47, 8 December 2020 (UTC)[reply]

FXConvert

[edit]

I wanted to have something like INRConvert for other currencies so I started this: Draft:Template:FXConvert. It could be extended with a target currency, but I did not need it now and I tried to keep it simple, as I have for example hit the expansion limit when doing nested Inflation elsewhere. Trigenibinion (talk) 11:24, 31 December 2020 (UTC)[reply]

I have made the parameters more like INRConvert's. Now it is also possible to choose INPUT units (pa for paise, p for penny, ct for cent). Trigenibinion (talk) 17:57, 31 December 2020 (UTC)[reply]
I have added a description to the documentation. Trigenibinion (talk) 19:18, 2 January 2021 (UTC)[reply]
Now it can display with the units provided and always links them. Trigenibinion (talk) 22:12, 2 January 2021 (UTC)[reply]
The template should probably not add links by default, as that could quickly run afoul of WP:OVERLINK in articles with a significant amount of financial data. Cyphoidbomb (talk) 22:53, 2 January 2021 (UTC)[reply]
Well, I think clarification should always be there. There is repeated linking, but I wanted the template to be as simple as possible to try to avoid expansion problems. It is already too complicated compared to what I started with (I imagine it does better than INRConvert, so if somebody wants to add the link parameter to avoid repetition without removing result clarification, they are welcome). If one wants to avoid repetition taking into account other text, one would need to be able to specify which clarifications should be disabled (I imagine it is more practical for links to be the default than the reverse, but maybe you know whether the most common contexts in which INRConvert is being used suggest the reverse). Anyway, this is currently not a replacement for INRConvert as at present it only converts to USD from several currencies, while INRConvert converts from Indian rupees to several currencies. Thanks for looking at it. Trigenibinion (talk) 06:35, 3 January 2021 (UTC)[reply]
Maybe the easiest would be for linking to be off as you say and for full control I could add: lk=on, lk=source, lk=original, lk=inflated, lk=result, lk=converted, lk=source-converted. Trigenibinion (talk) 06:47, 3 January 2021 (UTC)[reply]
I have done it. One thing to note is that this template generalizes paise to mean cents in whatever currency, what do you think? Trigenibinion (talk) 08:11, 3 January 2021 (UTC)[reply]
I have added more fractional currencies with examples for some countries where it would be proper usage. Trigenibinion (talk) 18:58, 3 January 2021 (UTC)[reply]
I added custom resolution support with the r parameter like Inflation and now ToUSD. Anything missing? Trigenibinion (talk) 16:44, 4 January 2021 (UTC)[reply]
Template:FXConvert, Template:GBPConvert, Template:CADConvert, Template:AUDConvert. They are thought to be extendable to other currencies in the future with a to parameter, as well as reserving the next two positional arguments to support ranges (note that the precision parameter differs from INRConvert, as it is not positional, but handled by r, as in other templates). Trigenibinion (talk) 18:12, 6 January 2021 (UTC)[reply]
Template:JPYConvert and Template:ZARConvert added for convenience too. Trigenibinion (talk) 18:35, 6 January 2021 (UTC)[reply]
Template:Inflation has problems with KRW. Trigenibinion (talk) 20:26, 6 January 2021 (UTC)[reply]
Template:Inflation was fixed for KRW, so now Template:KRWConvert is available. Trigenibinion (talk) 03:16, 11 January 2021 (UTC)[reply]
@Trigenibinion: I don't want to discourage your efforts, but as a bit of a broad note: talk pages are intended to discuss changes to the relevant article, or template or category or whatever. While I get that INRConvert was the inspiration for the new template you created, you're using Template talk:INRConvert as, basically, a release notes depository for your changes at Template:FXConvert, and I don't think that's the best use of this talk space. These notes might be better posted at Template talk:FXConvert. Regards and thanks. Cyphoidbomb (talk) 03:24, 11 January 2021 (UTC)[reply]

INRConvert/HistoricalRate

[edit]

{{To USD}} now leverages this subtemplate. Thanks. Trigenibinion (talk) 04:21, 12 January 2021 (UTC)[reply]

What about supporting ECU and EUA (successive parity replacements until Euro, so no need to change symbol)? Now it only has Euro data back to 1999. Eurostat has USD data back to 1971, but INR goes back only to 2001. Trigenibinion (talk) 17:21, 31 January 2021 (UTC)[reply]

INRConvert/Wordify

[edit]

Take a look at {{FXConvert/Wordify}} for some improvements. It also has testcases. Trigenibinion (talk) 21:17, 16 January 2021 (UTC)[reply]

I have now re-implemented it in Module:Formatnum, so that expansion depth can be reduced. Trigenibinion (talk) 18:16, 19 February 2021 (UTC)[reply]
The function has been moved to Module:Wordify. Trigenibinion (talk) 00:12, 11 March 2021 (UTC)[reply]

Better explanation of 'lk'

[edit]

In the description for lk, at the top it says, "By default, the parameter is set to 'off' (i.e. it is set not to link)."
At the bottom it says, "On by default."
From the examples, I assume it should be On by default.
However, I didn't understand, even from the examples, what lk actually does. It is linking what with what? Jay (talk) 19:36, 2 April 2021 (UTC)[reply]

It shows a link for the word only on the original price. Trigenibinion (talk) 21:26, 16 April 2021 (UTC)[reply]

Reversing the order

[edit]

How can I reverse the order of how the figures appear? I would like the rupees to come in brackets.
{{INRConvert|19|k}} gives ₹19,000 (US$270)
I would like it to appear as US$270 (₹19,000) Jay (talk) 19:51, 2 April 2021 (UTC)[reply]

I think such a display would only be appropriate if the original price was in USD. Trigenibinion (talk) 21:22, 16 April 2021 (UTC)[reply]

Can this work with sortable tables?

[edit]

Is there a way to make this work automatically with sortable tables? e.g. the table at https://en.wikipedia.org/wiki/2023_Women%27s_Premier_League_(cricket) should be sortable by value. Matthewmayer (talk) 11:37, 25 February 2023 (UTC)[reply]

Error when specifying multiple currencies when USD is not present or is not first

[edit]

When specifying multiple currencies in the |to= parameter and USD is not included or is included, but is not the first, I get an error.

For example, when USD is excluded:

{{INRConvert|1000|year=1955|to=EUR GBP AUD CAD NZD}}

this is the result:

₹1,000 (equivalent to ₹92,000Template:INRConvert/EUR GBP AUD CAD NZD in 2020)

Similarly, when USD is included, but is not the first:

{{INRConvert|1000|year=1955|to=EUR USD GBP AUD CAD NZD}}

this is the result:

₹1,000 (equivalent to ₹92,000Template:INRConvert/EUR USD GBP AUD CAD NZD in 2020)

When USD is the first:

{{INRConvert|1000|year=1955|to=USD EUR USD GBP AUD CAD NZD}}

this is the result:

₹1,000 (equivalent to ₹92,000, US$1,200, €1,100, £960, A$1,700, C$1,500 or NZ$1,800 in 2020)

Is the intention that USD must be present and as the first currency when |to= is specified?  — Archer1234 (t·c) 10:25, 1 April 2023 (UTC)[reply]

Error using historical mode when more than one currency is specified

[edit]

When |mode= is set to historical and |to= is set to more than one currency, I get an error.

For example, this:

{{INRConvert|1000|year=2000|to=USD EUR|mode=historical}}

results in:

₹1,000 (Expression error: Unexpected < operator)

Whereas, if the currencies are specified separately, the historical values are displayed appropriately:

{{INRConvert|1000|year=2000|to=USD|mode=historical}} → ₹1,000 crore (US$22.25)
{{INRConvert|1000|year=2000|to=EUR|mode=historical}} → ₹1,000 crore (€24.1)

Am I doing something wrong or is this an intended limitation of this template?  — Archer1234 (t·c) 11:04, 1 April 2023 (UTC)[reply]

@Archer1234 late response to this, looking at the source and several other XYZConvert templates, the "to" parameter is designed only for a single currency. Ravensfire (talk) 13:59, 7 July 2023 (UTC)[reply]

Update historical data

[edit]

Anyone feel comfortable enough updating the historical inflation rates to include 2021 and 2022? Also the current rates could use updating to more current values. I've botched this in the past so prefer not to make the changes, if someone else doesn't mind. Ravensfire (talk) 14:05, 7 July 2023 (UTC)[reply]

I will try updating. Also, is there a template only for Indian inflation conversion and not including the USD currency conversion, and is there a way to update monthly CPI data here to be more updated, for example till May 2023 like the website Inflation Tool? Cinephile4ever 17:41, 7 July 2023 (UTC)[reply]
The documentation for this template says "Data for the inflation rate is at {{Inflation/IN/dataset}} (see Template:Inflation#Developer documentation for details)" It's using that inflation template I mentioned in our other discussion. While the data set for this template looks straight-forward, the inflation dataset is more complicated and may need a request there for someone familiar with it to update. Ravensfire (talk) 18:00, 7 July 2023 (UTC)[reply]
I'm working on the Inflation dataset, getting it up to 2022. That was interesting to figure out how that worked. Two other templates need to be updated but require template editor rights. Dataset has been updated, edit-requests left for the other two templates. Ravensfire (talk) 18:49, 7 July 2023 (UTC)[reply]

Feature request: sorting

[edit]

There are multiple pages where this template is used in sortable tables (e.g. List of banks in India). Currently, {{sort}} is used to add a sorting key, but it is error-prone. Someone may update the value inside this template while forgetting to update the sorting key. This template could add an option, which, if set, would automatically generate a sorting key. Arnav Bhate (talk) 06:44, 13 November 2023 (UTC)[reply]