static void Show() {
Calendar c = Calendar.getInstance();
c.set(2010, 11, 14);
Date d2 = c.getTime();
Locale LocaleDK = new Locale("da", "DK");
Locale LocaleIT = new Locale("it", "IT");
Locale LocaleFR = new Locale("fr", "FR");
// In Italy we say danese !
System.out.println("D>I:" + LocaleDK.getDisplayLanguage(LocaleIT));
System.out.println("I>D:" + LocaleIT.getDisplayLanguage(LocaleDK)); // Italian in Danemark
// LocalIT can translate "Italian" in ALL the languages
System.out.println("D>F:" + LocaleDK.getDisplayLanguage(LocaleFR));
// In Denmark we say French
System.out.println("F>D:" + LocaleFR.getDisplayLanguage(LocaleDK));
}
}
run:
D>I:danese
I>D:Italian
D>F:danois
F>D:French
No comments:
Post a Comment