Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h3>Issues with this approach</h3> <p>If you need to output currency text, I would recommend that you do not store the currency symbol associated with the currency data. Even if the symbol is stored in another column and you pull it out as needed. Rather a better approach would be to store the region / locale for the currency data then, format the currency using the regions default formatting. If whatever language/platform you are using doesn't have locale based currency functionality, I still think this is a better approach. In that case, you would do the formatting in a bit of application logic and then display it to the user.</p> <p>The main reasoning being this is that in different regions and locales not only is the symbol different, but so is the placement of the symbol and the formatting of the currency itself. Also think if you need to distinguish between different types of dollars - maybe at some point you will want to indicate if the dollar amount is in USD, HKD, AUD, etc.</p> <h3>Currency examples</h3> <pre><code> 1.234,56€ - Euro (Germany) € 1.234,56 - Euro (Netherlands) € 1,234.56 - Euro (Ireland) 123,456円 - Yen (Japan) 123,456¥ - Yen (Japan) - yes there are two different currency marks! </code></pre> <h3>Other resources</h3> <ul> <li>I found a good article on the MSDN site on <a href="http://msdn.microsoft.com/en-us/goglobal/bb688126.aspx" rel="noreferrer">currency globalization</a> that helps to better explain the problem.</li> <li>Here is site on the different <a href="http://www.evertype.com/standards/euro/formats.html" rel="noreferrer">formats per locale</a> that for the Euro.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload