List of usage examples for java.util Locale setDefault
public static synchronized void setDefault(Locale.Category category, Locale newLocale)
From source file:Main.java
public static void main(String[] args) { Locale.setDefault(Locale.Category.FORMAT, Locale.getDefault()); }
From source file:Test.java
public static void main(String[] args) { Locale locale = Locale.getDefault(); Calendar calendar = Calendar.getInstance(); calendar.setWeekDate(2012, 16, 3);/*from www. j a va 2s . co m*/ System.out.println( DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG).format(calendar.getTime())); System.out.println("" + locale.getDisplayLanguage()); Locale.setDefault(Locale.Category.FORMAT, Locale.JAPANESE); Locale.setDefault(Locale.Category.DISPLAY, Locale.GERMAN); System.out.println( DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG).format(calendar.getTime())); System.out.println("" + locale.getDisplayLanguage()); }