Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Locale

 
Hama Kamal
Ranch Hand
Posts: 144
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

i'm supposed to get the result in italian when i run below code but i get it in eglish,,, any idea?

 
Riza Aktunc
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As explained in here : http://download.oracle.com/javase/1.4.2/docs/api/java/util/Calendar.html#getInstance%28java.util.Locale%29 ; getInstance(loc) just gets the time of the given locale not the language.

If you want to print the date in Italian, you need to use DateFormat class.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic