Link to home
Start Free TrialLog in
Avatar of Josh_Blade
Josh_Blade

asked on

Currency Conversion / Localization

I'm working on globalization/localization of my MVC3 project. I'm setting the culture info by a user selected language drop down. So it has English/Spanish/Italian/German etc.

This also changes the currency symbol, which is nice, but I'm not sure about the best way to go about actually doing currency conversions in my app. I'd like to have everything stored in my database in dollars and just have the display for any currency amounts in the localized conversion.

After googling around, most of the localization for currencies I saw had to do with the symbol and not with actually doing any conversions...

Is there a good way of doing this? We would most likely have a conversion table that was updated daily, but I'm looking for an easy way to change the display (and only the display) for currencies.
SOLUTION
Avatar of themrrobert
themrrobert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could try these guys http://www.yourcurrencyconverter.com/

I had a lot of trouble with them and ended up writing my own,  is an example of a client of mine, click the flags:

http://www.amanzitravel.co.uk/product/africa/namibia/volunteer_project/wildlife_conservation_volunteer/namibia_wildlife_sanctuary_av001/index.html

Here is my half-developed site - I haven't finished the automated sign-up, nor are the rates quoted my final rates - I haven't quite decided what to charge. But anyway on the resources tab I explain exactly how to do it so you can roll your own if wished.

http://currency.creative-dreaming.com/
Avatar of Josh_Blade
Josh_Blade

ASKER

I guess the biggest thing I'm struggling with is user input. If I have some currency input control, do I need to make sure to unconvert it in my controller when the page gets posted?

I was thinking it would be best to store everything in dollars and display the conversion, but then the users would be inputting information in the converted currency as well and I would have to convert it back to dollars to store in my db.

I'm just trying to find a non tedious way to multiply by conversion rate in the view and then divide by conversion rate in my controller (where applicable) so everything stays consistent.

There might not be an easy way and I just have to suck it up, but above is what I'm looking for.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
dale_burrell and themrrobert both answered my question pretty thoroughly and gave me some points to think about. Thanks guys.