Date conversion to a different locale
<p>I am working on an <code>Android</code> project in which I'm implementing localization.</p>

<p>I'll be getting the locale and the time zone. Using this information, I have written the below code:</p>

<pre><code>String []locale= User.getInstance().getLanguage().split("-");//Assume, locale[0]=hi, locale[1]=IN
Calendar choosenDate = Calendar.getInstance(new Locale(locale[0],locale[1]));
SimpleDateFormat Dformat = new SimpleDateFormat("MMMM dd yyyy",new Locale(locale[0],locale[1]));
Log.d("MY_APP","***********Newly converted date:"+Dformat.format(choosenDate.getTime()));
</code></pre>

<p>The log that I'm getting from the above code is:</p>

<pre><code>**********Newly converted date:सितंबर 07 2016
</code></pre>

<p>So, basically the problem I'm facing is only the <code>"MMMM"</code> i.e: the month part is getting converted into the Locale specified (in above language it is Hindi(hi-IN)). However, the <code>"dd yyyy"</code> is not getting converted into Hindi. </p>

<p>Can someone tell me what am I doing wrong or how can I make sure that even the dd and yyyy part also get converted to the specified locale.</p>