<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Internationalization on Shaaf's blog</title><link>https://shaaf.dev/tags/internationalization/</link><description>Recent content in Internationalization on Shaaf's blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 12 Nov 2008 14:52:08 +0100</lastBuildDate><atom:link href="https://shaaf.dev/tags/internationalization/index.xml" rel="self" type="application/rss+xml"/><item><title>Doing the Locale - Danmark</title><link>https://shaaf.dev/post/2008-11-12-doing-the-locale-danmark/</link><pubDate>Wed, 12 Nov 2008 14:52:08 +0100</pubDate><guid>https://shaaf.dev/post/2008-11-12-doing-the-locale-danmark/</guid><description>&lt;p>The following illustrates how to get the Number format working with a danish locale.&lt;/p>
&lt;div class="code-block">
 &lt;div class="code-header">
 &lt;div class="code-dots">
 &lt;span class="d1">&lt;/span>&lt;span class="d2">&lt;/span>&lt;span class="d3">&lt;/span>
 &lt;/div>
 &lt;span class="code-filename">text snippet&lt;/span>
 &lt;span class="code-lang">TEXT&lt;/span>
 &lt;/div>&lt;pre tabindex="0">&lt;code>	import java.text.NumberFormat;
	import java.util.Currency;
	import java.util.Locale;


	public class TestLocale {

	public static void main(String args[]){
		// Create a Locale for Danmark
		Locale DANMARK = new Locale(&amp;#34;da&amp;#34;,&amp;#34;DK&amp;#34;);

 		// get the currency instance for this locale.
 		Currency krone = Currency.getInstance(DANMARK);

 		// Get a Number format for the locale.
 		NumberFormat krFormat = NumberFormat.getCurrencyInstance(DANMARK);
 		// A symbol for the currency
 		String symbol = krFormat.getCurrency().getSymbol();
 		// A double amount
 		double amount = 10000.25;
		// print it out after formatting.
 		System.out.println(krFormat.format(amount));
 		}
	}&lt;/code>&lt;/pre>&lt;/div></description></item></channel></rss>