I want to format dates with month names with localized label in different languages including Turkish,
how do I set formatted labels for months
Use the SimpleDateFormat
constructor taking a Locale
.
SimpleDateFormat sdf = new SimpleDateFormat("dd MMMM yyyy", new Locale("tr"));
String date = sdf.format(new Date());
System.out.println(date); // 27 Eylül 2011
The Locale
accepts an ISO-639-1 language code.