Yahoo Currency Converter - AJAX version
Written by kksou   
Friday, 29 August 2008

This module allows you to add the Yahoo Currency Converter in a module position.

The module makes use of the Currency Converter from Yahoo Finance.

Unique Features

  • Performs currency conversion by connecting in real-time at the backend to the Currency Converter from Yahoo Finance. So you get the most up-to-date currency rate as provided by Yahoo Finance.
  • Uses AJAX to display the result - no reloading of pages required!
  • Full CSS support! This means that you can set the font family, font size, foreground and background color of the input field, submit button, etc.
  • The module can be included in a content item! (see below for details)
  • Support of 153 currencies around the world! [view complete list]
  • Available for all Joomla versions: Joomla 1.0.x, native 1.5.x, 1.6.x, 1.7.x and 2.5.x!

Important Note: Yahoo Finance has changed its interface to pure AJAX module. As a result, it is no longer possible to retrieve the converted currencies using fread() or the cURL library direct from

In case you're wondering where does the program get the currency conversion rate from? First go to, click the link "View 5 Day Trend", then on the left navigation bar, you will see one more link "Summary". Click on that link. This is where the program gets the rate for the currency conversion.

Latest Version

v1.0.7 (for Joomla 1.0), v1.5.7 (for Joomla 1.5), v1.6.7 (for Joomla 1.6), v1.7.7 (for Joomla 1.7), v2.5.7 (for Joomla 2.5)
Released April 6, 2012

Thanks to feedback from Dusan and Alansticks, it turns out that Yahoo has recently changed its website again that allows us to retrieve the currency conversion rate.

The latest version now also handles the following 2 cases:

  • 25,000 will now be correctly handled as 25000
  • Any empty spaces after a number will be automatically trimmed and handled correctly

Live Demo

There are four demos available:

Prefer Google Finance?

If you prefer to use the Currency Converter from Google Finance as oppose to Yahoo Finance, here it is:
Google Currency Converter - AJAX version

Complete list of Currencies supported by Yahoo

  1. AED - UAE Dirham
  2. ALL - Albanian Lek
  3. ANG - Neth Antilles Guilder
  4. ARS - Argentine Peso
  5. AUD - Australian Dollar
  6. AWG - Aruba Florin
  7. BBD - Barbados Dollar
  8. BDT - Bangladesh Taka
  9. BGN - Bulgarian Lev
  10. BHD - Bahraini Dinar
  11. BIF - Burundi Franc
  12. BMD - Bermuda Dollar
  13. BND - Brunei Dollar
  14. BOB - Bolivian Boliviano
  15. BRL - Brazilian Real
  16. BSD - Bahamian Dollar
  17. BTN - Bhutan Ngultrum
  18. BWP - Botswana Pula
  19. BYR - Belarus Ruble
  20. BZD - Belize Dollar
  21. CAD - Canadian Dollar
  22. CHF - Swiss Franc
  23. CLP - Chilean Peso
  24. CNY - Chinese Yuan
  25. COP - Colombian Peso
  26. CRC - Costa Rica Colon
  27. CUP - Cuban Peso
  28. CVE - Cape Verde Escudo
  29. CZK - Czech Koruna
  30. DJF - Dijibouti Franc
  31. DKK - Danish Krone
  32. DOP - Dominican Peso
  33. DZD - Algerian Dinar
  34. ECS - Ecuador Sucre
  35. EEK - Estonian Kroon
  36. EGP - Egyptian Pound
  37. ERN - Eritrea Nakfa
  38. ETB - Ethiopian Birr
  39. EUR - Euro
  40. FJD - Fiji Dollar
  41. FKP - Falkland Islands Pound
  42. GBP - British Pound
  43. GHC - Ghanian Cedi
  44. GIP - Gibraltar Pound
  45. GMD - Gambian Dalasi
  46. GNF - Guinea Franc
  47. GTQ - Guatemala Quetzal
  48. GYD - Guyana Dollar
  49. HKD - Hong Kong Dollar
  50. HNL - Honduras Lempira
  51. HRK - Croatian Kuna
  52. HTG - Haiti Gourde
  53. HUF - Hungarian Forint
  54. IDR - Indonesian Rupiah
  55. ILS - Israeli Shekel
  56. INR - Indian Rupee
  57. IQD - Iraqi Dinar
  58. IRR - Iran Rial
  59. ISK - Iceland Krona
  60. JMD - Jamaican Dollar
  61. JOD - Jordanian Dinar
  62. JPY - Japanese Yen
  63. KES - Kenyan Shilling
  64. KHR - Cambodia Riel
  65. KMF - Comoros Franc
  66. KPW - North Korean Won
  67. KRW - South Korean Won
  68. KWD - Kuwaiti Dinar
  69. KYD - Cayman Islands Dollar
  70. KZT - Kazakhstan Tenge
  71. LAK - Lao Kip
  72. LBP - Lebanese Pound
  73. LKR - Sri Lanka Rupee
  74. LRD - Liberian Dollar
  75. LSL - Lesotho Loti
  76. LTL - Lithuanian Lita
  77. LVL - Latvian Lat
  78. LYD - Libyan Dinar
  79. MAD - Moroccan Dirham
  80. MDL - Moldovan Leu
  81. MKD - Macedonian Denar
  82. MMK - Myanmar Kyat
  83. MNT - Mongolian Tugrik
  84. MOP - Macau Pataca
  85. MRO - Mauritania Ougulya
  86. MTL - Maltese Lira
  87. MUR - Mauritius Rupee
  88. MVR - Maldives Rufiyaa
  89. MWK - Malawi Kwacha
  90. MXN - Mexican Peso
  91. MYR - Malaysian Ringgit
  92. NAD - Namibian Dollar
  93. NGN - Nigerian Naira
  94. NIO - Nicaragua Cordoba
  95. NOK - Norwegian Krone
  96. NPR - Nepalese Rupee
  97. NZD - New Zealand Dollar
  98. OMR - Omani Rial
  99. PAB - Panama Balboa
  100. PEN - Peruvian Nuevo Sol
  101. PGK - Papua New Guinea Kina
  102. PHP - Philippine Peso
  103. PKR - Pakistani Rupee
  104. PLN - Polish Zloty
  105. PYG - Paraguayan Guarani
  106. QAR - Qatar Rial
  107. RON - Romanian New Leu
  108. RUB - Russian Rouble
  109. RWF - Rwanda Franc
  110. SAR - Saudi Arabian Riyal
  111. SBD - Solomon Islands Dollar
  112. SCR - Seychelles Rupee
  113. SDG - Sudanese Pound
  114. SEK - Swedish Krona
  115. SGD - Singapore Dollar
  116. SHP - St Helena Pound
  117. SIT - Slovenian Tolar
  118. SKK - Slovak Koruna
  119. SLL - Sierra Leone Leone
  120. SOS - Somali Shilling
  121. STD - Sao Tome Dobra
  122. SVC - El Salvador Colon
  123. SYP - Syrian Pound
  124. SZL - Swaziland Lilageni
  125. THB - Thai Baht
  126. TND - Tunisian Dinar
  127. TOP - Tonga Pa'ang
  128. TRY - Turkish Lira
  129. TTD - Trinidad Tobago Dollar
  130. TWD - Taiwan Dollar
  131. TZS - Tanzanian Shilling
  132. UAH - Ukraine Hryvnia
  133. UGX - Ugandan Shilling
  134. USD - United States Dollar
  135. UYU - Uruguayan New Peso
  136. VEF - Venezuelan Bolivar Fuerte
  137. VND - Vietnam Dong
  138. VUV - Vanuatu Vatu
  139. WST - Samoa Tala
  140. XAF - CFA Franc (BEAC)
  141. XAG - Silver Ounces
  142. XAL - Aluminium Ounces
  143. XAU - Gold Ounces
  144. XCD - East Caribbean Dollar
  145. XCP - Copper Pounds
  146. XOF - CFA Franc (BCEAO)
  147. XPD - Palladium Ounces
  148. XPF - Pacific Franc
  149. XPT - Platinum Ounces
  150. YER - Yemen Riyal
  151. ZAR - South African Rand
  152. ZMK - Zambian Kwacha
  153. ZWD - Zimbabwe Dollar

Including this module in Content Item or Article

Since this is a standard Joomla module, you can easily include this module into a content item or article with the use of {mosloadposition} (for Joomla 1.0.x) or {loadposition} (for Joomla 1.5.x).

You can take a look at the demo here.


Remove the "Powered by" links

If you find the module useful and would like to use the module without the "Powered-by" links, you may do so by purchasing a "Powered-by" removal license for only USD $10 per site.

Secured payment is processed by All major credit cards are accepted, including Visa, Mastercard and American Express, etc. You can also pay by PayPal. Once the transaction is completed, you will be given a link to download the registered version with the "Powered by" links removed.

How to install

  1. Download and install the "Yahoo Currency Converter" module.
  2. Make sure the module is published / enabled.
  3. Select a module position where you want to place the module.

That's it! You're now ready to use the Yahoo Currency Converter right inside your Joomla website!


You can set the following in the Parameters page:

  1. Use which method to retrieve data: There are now three methods to retrieve data from Yahoo Finance.
    • The default method uses fread().
    • You can also use file_get_contents(). Note that file_get_contents() is only available in PHP5 and above.
    • Use the cURL library. For this method, you need to make sure your PHP has the cURL library installed.

    Use the default method fread() first. If it doesn't work, then try file_get_contents(), and then the cURL library.

  2. Currency From: This is the default "currency from" that will be displayed when the module is first loaded.
  3. Currency To: This is the default "currency to" that will be displayed when the module is first loaded.
  4. Label for Submit Button: Default is "Convert". You may change this to your language.
  5. Use CSS for highlight: When this is set to "No", result will be highlighted in the default yellow background. If you do not not like the default yellow background color and wish to change this to some other color, change this to "Yes". However, when you set this to "Yes", you need to define the color in the .css file of your template. Please see below for details.
  6. Layout style: There are three layout styles to choose from:
  7. Style 1 This one has the minimum width, and is ideal when you are positioning it in the left or right column.
    Goolge Currency Converter - Style 1
    Style 2 This is the same layout as used in Google Finance.
    Goolge Currency Converter - Style 2
    Style 3 This one shows everything in one line. Ideal for use in top or bottom banner-type module position, or in content item.
    Goolge Currency Converter - Style 3

Styling the Module using CSS

You can set the style of every item within the Yahoo Currency Converter to the exact format you want through CSS. This means that you can set the font family, font size, foreground and background color of the input field, pulldown menu, submit button, etc.

For example, if you're using the default Joomla 1.5 template, define the following style in <joomla root folder>/templates/rhuk_milkyway/css/template.css. If you're using the default Joomla 1.0 template, define the following style in <joomla root folder>/templates/rhuk_solarflare_ii/css/template_css.css.

  1. Input Box
  2. div.yahoocurrency input.inputbox {
    	font-family: Verdana;
    	font-size: 12pt;
    	font-style: italic;
  3. Submit Button
  4. div.yahoocurrency input.button {
    	font-family: Verdana;
    	font-size: 10pt;
  5. The options of the pulldown menu (i.e. the list of currencies)
  6. div.yahoocurrency option {
    	font-family: Verdana;
    	font-size: 10pt;
  7. The selected option of the pulldown menu (i.e. the selected currency)
  8. div.yahoocurrency select {
    	font-family: Verdana;
    	font-size: 10pt;
  9. Input Label (the text "Convert" and "Into")
  10. div.yahoocurrency .input_label {
    	font-family: Verdana;
    	font-size: 12pt;
  11. The result
  12. div.yahoocurrency .result {
    	font-family: Verdana;
    	font-size: 12pt;
  13. The highlight for the result. Note: Don't forget to set the "Use CSS" to "Yes" in the Parameters page in order to change the background color of the highliglht.
  14. div.yahoocurrency .highlight {
    	color: #333366;
    	background-color: #0033ff;
  15. Use this if you wish to set the background color of the entire module block:
  16. div.yahoocurrency {
    	background: #33FF66;

Version History

  • v1.0.1 (for Joomla 1.0) and v1.5.1 (for Joomla 1.5)
    Released September 3, 2008
    • Fixed a bug in Internet Explorer. The module will now work correctly in IE.
    • Support for non-javascript browser and browsers which do not allow javascript! For these browsers, since AJAX cannot run, there will be reloading of the page when the submit button is clicked. The same result will appear for both the AJAX and non-AJAX mode.
  • v1.0.2 (for Joomla 1.0) and v1.5.2 (for Joomla 1.5)
    Released September 28, 2008
  • Thanks to Andre who pointed out that the converter keeps "spinning" when one enters a large amount e.g. 10,000. This is because the previous version did not test for the comma sign.

    The new version has fixed this.

  • v1.0.3 (for Joomla 1.0) and v1.5.3 (for Joomla 1.5)
    Released January 17, 2009
  • Yes, the Yahoo Currency Converter is back again!

    Managed to find another Yahoo Finance page that allows us to grab the cuurency conversion rate.

    Please refer to here for more details.

  • v1.0.5 (for Joomla 1.0) and v1.5.5 (for Joomla 1.5)
    Released September 1, 2009
  • Thanks to Juan Manuel Rico who informed me about Venezuelan's new currency. Have changed the code from Venezuelan Bolivar (VEB) to Venezuelan Bolivar Fuerte (VEF).

  • v1.0.4 (for Joomla 1.0) and v1.5.4 (for Joomla 1.5)
    Released August 31, 2009
  • This is in response to Alamshahi's post titled "uncorrect results : missed digits".

    The error occurred when Yahoo returns a conversion rate greater than 1,000. The original program was "confused" because of the ',' in 1,000. Have fixed the bug in this version.

    In this new release, I've also added support for retrieving yahoo currency data using file_get_contents() or fread(). So for those people with no cURL library, you can now use the module using file_get_contents() or fread().

  • v1.0.6 (for Joomla 1.0), v1.5.6 (for Joomla 1.5), v1.6.6 (for Joomla 1.6) and v1.7.6 (for Joomla 1.7)
    Released January 25, 2012
  • Support for native Joomla 1.6 and Joomla 1.7!

    Have also updated the currency list to the latest from

  • v1.0.6 (for Joomla 1.0), v1.5.6 (for Joomla 1.5), v1.6.6 (for Joomla 1.6), v1.7.6 (for Joomla 1.7), v2.5.6 (for Joomla 2.5)
    Released January 26, 2012
  • Native version of the Yahoo Currency Converter for Joomla 2.5!

FAQ (Frequently Asked Questions)

Q1: I modified the stylesheet as outlined in Styling the Module using CSS. But the new styles do not seem to take effect.

A1: Note that after you have modified the stylesheet, you have to reload the page so that the stylesheet is reloaded.

I've also found that for some browsers, they still use the "cached" version of stylesheet even when you click the "Reload" button. In such case, you need to clear the cache so the the modified stylesheet gets reloaded.

Q2: I changed the format from Style 1 to Style 2. But the Yahoo Currency Converter are still displayed as Style 1.

A2: After you have changed the style in Modules Manager from Style 1 to Style 2, make sure you click the "Reload" button on the page in which the Yahoo Currency Converter is displayed.



+1 # Dusan Milic 2012-02-19 08:18
hi, i noticed that Yahoo Currency Converter don't work on my site anymore.
is there a fix?
# Alansticks 2012-03-30 03:35
I've also noticed the currency converter does not work on my site also? Do you know what the problem is?
# kksou 2012-04-06 02:34
Hi Dusan and Alansticks,

It turns out that Yahoo has recently changed its website again that allows us to retrieve the currency conversion rate.

Please download the latest version above:

Let me know if it works with the new version, ok?

# rocketero 2013-05-13 08:34
Do you know where in the code is the place to control the size of the inputbox where the 1 is located? the first box in-front of: convert. I need to resize it smaller to accommodate it to my template.

thanks in advance for any reply.
# Dusan Milic 2013-05-13 15:07
Hi rocketero

its in mod_yahoocurren cyconverter_lib .php file, look for function that begins with "if ($style==2) { ... ...." it apears at 3 places, someting like "......"
# Dusan Milic 2013-05-13 15:08
oh, it stripped code i treid to paste, look for

# kksou 2013-05-13 21:18
Thanks, Dusan!

Rocketero, did you manage to find it?

# rocketero 2013-05-14 04:44
I have changed those values (size=\"5\") to 2, 3, 4, and the box stays the same; I think that somehow the joomla template I'm using is not allowing to resize that box somehow.
# kksou 2013-05-14 04:51

It could be your cache.

Try to clear the joomla cache as well as your browser cache and see if it works.

# rocketero 2013-05-14 04:59
I have delteted /cache content and also /administrator/cache and also /template/mytemplate/css-compiled contents and nothing changes in that box. I even went to the extreme of delteting this:

"class=\"inputbox\" maxlength=\"12\" size=\"5\"

from line 120, 142 and 156 of that file, and the yahoocurrency form still shows with the same boxes sizes and delivers the currency change.
# rocketero 2013-05-14 05:02
I made sure everytime I delted the web browser cache (opera and chrome), and still the yahoocurrency form shows with same size boxes.
# kksou 2013-05-14 05:09

Can you do a view source of your page - does it shows the old or the new value?

# rocketero 2013-05-14 05:29
it's located here I just want to cut the exess size to the right of the column to make it even but the template is sort of complicated. :-?
# rocketero 2013-05-14 05:42
I have been using opera's and chrome 'Inspect Element' and after I deleted those values from the yahoocurrencyco nverter_lib.php they still show at the source code. so it has to be somewhere and I have deleted all the cache, or the ones I mentioned above, I don't know if there are other caches.
# rocketero 2013-05-14 05:56
for instance, if you use now 'inspect element' in opera or chrome, you'll see that it says size=2 but the box is still big.
# kksou 2013-05-14 08:47
Yes, it's indeed strange.

Think it's your Joomla template style sheet causing the effect.

To verify this, try setting up a fresh install of Joomla somewhere on your server and then test it with the standard Joomla template. You will see whether the module works ok with the standard Joomla template.

< Prev   Next >

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2015. All Rights Reserved