|Introduction||Displaying Exchange Rates|
|Benefits||Updating the Exchange Rates|
|Shopping Carts||Comparison of CurrCon with Oanda FxCommerce|
|How It Works||Configuring|
|Details of the Applet Tags||Daily Procedure|
|Examples Using Different Show Parameters||Manual Procedure|
|Displaying Large Amounts||Costs|
|Details of the show Parameter||Links|
The currency converter lets you display prices/amounts in the native currency of the visitors to your website. The currency converter automatically selects the default currency to display based on the locale country setting of the browser. It currently supports 169 different currencies.
The CurrCon Currency Converter is available with Java source to download.
In other words, Americans automatically see American prices and Canadian see Canadian prices and the Dutch see Euros. Viewers can optionally view the prices on the page in another currency. Changing any currency selector on the page instantly changes all the prices on the page to that currency.
Unlike most currency converters, with this one, the user does not enter amounts to be converted. The values come from your web page. All prices on your web pages are instantly displayed in the user’s favourite currency without him having to do anything.
I am working on a server-side version of CurrCon that does not need Java, however it still would not be suitable for use with shopping carts since it would not be integrated into the shopping cart software. Perhaps some shopping cart vendors will merge it into their products when I release it.
If you change the currency choice anywhere on a page, automatically all the other displays on the page instantly follow suit. Try using the up down arrow to cycle through the possible currencies. Try it below:
You need to code some HTML (Hypertext Markup Language) that looks like this:
<!-- macro CurrCon C$AcN USD 30.00 -->
which expands to:
To get that you code some HTML like this:
<!-- macro CurrCon cA USD 30.00 -->which expands to this:
To get that you code some HTML like this:
<!-- macro CurrCon A USD 20.00 -->which expands to this:
In HTML5 (Hypertext Markup Language version 5), you use the OBJECT tag that looks like this:
|CurrCon Display Variations|
|How a $70 USD
Price is displayed
|Format Letter Combination|
|CurrCon Display of Large Amounts|
|1,000,000 one million USD|
|1,200,000 1.2 million USD|
|10,000,000 10 million USD|
|12,000,000 12 million USD|
|1,000,000,000 one billion USD|
|12,000,000,000 12 billion USD|
|12,300,000,000 12.3 billion USD|
|19,930,000,000 19.93 billion USD, note rounding|
|19,000,000,000 19 billion USD|
|19,000,000,000,000 19 trillion USD|
|Letter||What it looks like||Changeable||Width in Pixels||Purpose|
|c||54||Allows user to change the currency for all displays on the page. This was increased from 52 pixels on 2010-02-04 to handle wide abbreviations such as KRW.|
|C||32||Compactly let’s user know what Currency is being used with a three-letter abbreviation, as a display that cannot directly changed.|
|N||130||Spells out the currency Name being used in easy-to-understand words.|
|A||76||Show the Amount converted into the user’s favoured currency. If there is no A in the show parameter, you need not bother specifying the currency and amount parameters.|
|P||108||Show the Precise amount, converted into the user’s favoured currency. Does not use any of the short forms for large amounts.|
|$||30||Put a lead $/euro symbol etc. on the following amount.|
<!-- macro CurrCon cA USD 30.00 -->expands to: The tricky part in doing it manually is getting the right number of ../../ in the archive jar name and figuring out the exact width and height.
I run the macro processor on all my files just prior to any upload. I expand the macros, generate an index, compact the HTML, and provide a mirror website via the Replicator. The macro generator stripped down to handle just CurrCon macros is optionally included, but not the Compactor or the Replicator. I have not prepared the stripped down version of the macro generator since no one has asked for it yet. It could have it ready in a day or two at no extra cost.
|1 Euro is|
|1 British pound Sterling is|
|1 US dollar is|
|1 Canadian dollar is|
|1 New Zealand dollar is|
|Foreign Exchange Rate Currency Sources|
|Source||Format||Number of Currencies||Format||Notes|
|Bank of Canada||CSV (Comma-Separated Value)||57||CSV downloadable file, very convenient. Relative to Canadian dollar.||Official Government source, comes out 1 PM EST (Eastern Standard Time) each day. Has last 7 days of rates. This is the source I use at mindprod.com. Free. You can also pick them up indirectly already massaged into a jar file from the http://mindprod.com/applet/currcon.jar website each day.|
|Bank of Canada||PDF (Portable Document Format)||57||Relative to Canadian dollar.||Official Government source, comes out 1 PM EST each day. Has last 7 days of rates.|
|Bank of Canada||RSS||57||RSS feed. One for each country||Official Government source|
|oanda.com||html||193||Requires licencing the feed.|
Makers of the FxCommerce product that competes with CurrCon. It is illegal to use this site to feed data into CurrCon by screenscaping or copying from the screen. Their lawyer explained this in series of emails. Apparently, it would be legal if either you or I signed a licence agreement with them and paid a fee to use a special feed they have.
Oddly they even carry obsolete currencies, e.g. that of countries that have converted to the Euro.
You manually select which currencies you want, then it sends you a list of the exchange rates in HTML or CSV embedded in an HTML page. It is free to use, so long as you don’t actually make practical use of the information, so you can experiment with it for free.
If you curious about the history of how the US dollar (code USD) has been doing relative to the Canadian dollar (code USD), the Euro (code EUR) even the Iraqi Dinar (code IQD) see Oanda’s fxhistory. The US dollar is in deep trouble, but most Americans are unaware of what is happening. Money is fleeing America causing the value of the dollar to drop relative to other countries. The net effect is America has to pay more for imported goods which puts her still deeper in debt in a vicious spiral of debt.
|University of BC||html||26||HTML table screenscrape||Updated each noon Pacific Time|
|US Federal Reserve Bank||html||25||text in columns screenscrape||Official government source.|
|CustomHouse||html||26||HTML table screenscrape||rates are one day behind.|
|Microsoft||html||15||HTML table screenscrape||Updated frequently|
|XE.com||text||68||as an email in columns surrounded by extraneous text.||Email would need to be extracted manually when it arrived. Xe is a commercial provider so you would need to licence the right to use these figures.|
|newspaper||?||you type them in daily using a csv file.||This is a lot of work. It is error prone. The main advantage is no issue of paying royalties.|
|Requires special Code on the server?|
|Automatically selects user’s currency|
|Requires user to have Java enabled|
|Requires user to reload page to see prices?|
|Lets you control font, color etc. of prices with style sheets?|
|Includes daily feed of exchange rate changes?|
|exists and open source so it cannot ever be taken away from you.||Defunct|
CurrCon itself free but if you need help installing or configuring CurrCon, I am available on a consulting basis for a fee. I will help you configure CurrCon for your needs. I need to know which technique you will use to generate the Applet tags and what source you plan to use for the exchange rates. I need to know what program you use to upload to your website.
To help you get started quickly, I need to know which currency choices you want to offer.
The list of choices is limited by both what your exchange rate source offers and by the list of currency descriptions. To deliberately leave out a country, remove its line from countrytocur.csv. To deliberately leave out a currency, remove its line from currencydetails.csv.
The currency details list looks like this, with columns for abbreviation, decimal places, Unicode currency symbol, description:
|Key Files Used by CurrCon|
|com\mindprod\currcon\countrytocur.csv||Country code to Currency code conversion lookup table. In other words, which currency do people use in each country?|
|com\mindprod\currcon\CurrCon.java||CurrCon Java Applet source. Uses the exchs.ser file prepared each day to display prices as an Applet embedded in HTML.|
|com\mindprod\currcon\currcon.jar||The jar containing the CurrCon java Applet and the exchs.ser digested daily exchange rates. It is a compact 13K for fast loading. It is freshly prepared each day with the new exchange rates and uploaded to the website. Alternatively, you can just borrow mine from my website if you have no customisation.|
|com\mindprod\currcon\CurrConAux.java||CurrConAux main Java program source. Prepares the exchs.ser digest of exchange rates each day from the bank of Canada file.|
|com\mindprod\currcon\currencydetails.csv||Details about each currency, its name, how many decimal places you use to display it, what symbol to use for the dollar sign if any.|
|com\mindprod\currcon\daily.bat||Run daily to prepare jar for uploading to the website.|
|com\mindprod\currcon\dailym.bat||Run daily to prepare jar for uploading to the website, if you handle your exchange rates manually..|
|com\mindprod\currcon\seven_day_exchange_en.csv||File downloaded each day to the J:\com\mindprod\currcon\ directory from the bank of Canada website http://www.bankofcanada.ca/en/markets/csv/exchange_eng.csv containing the daily exchange rates for various countries with the currencies labelled using ISO (International Standards Organisation) 4217 codes.|
|com\mindprod\currcon\exchs.ser||The massaged and predigested exchange rates in a compact form ready for the CurrCon Applet. It is included in the currcon.jar prepared each day and uploaded to the website.|
|com\mindprod\currcon\manual.csv||Only used if you want to manually control the exchange rates. A list of currencies and their current exchange rates.|
CAD,0.98473 EUR,1.57104 GBP,1.98306 USD,1.0Use the upper case three letter codes for the currencies you want to support from the list in currencydetails.csv. The numeric value is the value of one unit of the currency in US dollars. The GBP (Great Britain Pound) and Euro will be greater than 1. The MXP Mexican peso will be less than 1. USD US dollars will be exactly 1. You need lines for the currencies you want to support, including USD. You can get the exchange rates from a newspaper or from one of the online sources.
CurrCon Currency Converter
❘ precis ❘ manual ❘ screenshot ❘ browse source repository
for the current version of CurrCon Currency Converter.
Currency converter for web pages.
3.1MB zip for CurrCon Currency Converter Java source, compiled class files, jar and documentation to run on your own machine as an Applet.
Runs on any OS that supports Java e.g. W2K, XP, W2003, Vista, W2008, W7-32, W7-64, W8-32, W8-64, W2012, Linux, LinuxARM, LinuxX86, LinuxX64, Ubuntu, Solaris, SolarisSPARC, SolarisSPARC64, SolarisX86, SolarisX64 and OSX.
First install the most recent Java.
To install, extract the zip download with WinZip, (or similar unzip utility) into any directory you please, often J:\ — ticking off the use folder names option.
To check out the corresponding source from the Subversion repository, use the TortoiseSVN repo-browser to
download ASP PAD XML program description for the current version of CurrCon Currency Converter.
CurrCon Currency Converter is free. Full source included. You may even include the source code, modified or unmodified in free/commercial open source/proprietary programs that you write and distribute. Non-military use only.
This page is posted
Optional Replicator mirror
|no blog for this page||Canadian
Your face IP:[220.127.116.11]
You are visitor number|