Easy way to change Locale based currency formatting in Java
<p>Below is some code that shows how we can format currency based on Locale.</p>

<p>Is there an easy way to configure this behaviour in Java? For example, let's say that I want to make a slight adjustment to how currency is formatted in Italian, by putting the Currency symbol after the amount, instead of in front of the amount.</p>

<pre><code>public static void main(String[] args)
{
    displayCurrency(Locale.ENGLISH);
    displayCurrency(Locale.FRENCH);
    displayCurrency(Locale.ITALIAN);
}

static public void displayCurrency( Locale currentLocale) {

    Double currencyAmount = new Double(9876543.21);

    DecimalFormat currencyFormatter = (DecimalFormat) 
        NumberFormat.getCurrencyInstance(currentLocale);

    System.out.println(currentLocale.getDisplayName() + ": " +
        currencyFormatter.format(currencyAmount));
}
</code></pre>

<p>Output:</p>

<pre><code>English: ¤9,876,543.21
French: 9 876 543,21 ¤
Italian: ¤ 9.876.543,21
</code></pre>