Our app is fully localized/globalized, supporting (some of the few) en-US and de-DE.
In our DB, some of the currency values are stored in USD, some of the currency values are stored as Euros. Obviously, we want to keep the currency straight between the two - formatting as USD, when in fact it is Euros, would be a big mistake.
So, following this example, we can format for USD/Euros, given the proper locale.
My issue is: Given data (12345.67) in the DB in Euros and the user logged into the en-US locale, I want to have the Euro symbol show up properly (including location of symbol relative to numeric value) and the commas/decimals to be proper as well (i.e. 12,345.67 €). And the reverse, given data (98765.43) in the DB in USD and the user logged into de-DE, I want to have the USD symbol show up and the commas/decimals to be proper as well (i.e. $ 98.765,43).
How can I achieve this?
Thanks,
--Ed