• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Locale

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Gurus,

What is locale and how it is used while retrieving the data from the database?

Thanks,

Smitha
 
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
which database, on what operating system?

the only "locale" i'm familiar with is a feature of Unix-like OSes. it's used to select appropriate localizations of things like currency formats, time formats, sorting sequences, and so on; specifically, it's used by the shared C library, and other libraries which depend on it. non-C languages often (but not always) have to go to a little extra trouble to utilize the locale specifications - i do not know how, or even whether, they are available from Java. (i've never written a program that had to be localized, namely, in any language.)

as for why any of this should impact data being retrieved from a database, i really can't imagine. maybe some databases do this by default, but that would surprise me - i can see too many ways for such behaviour to mess up the data, when the purpose of a database is to make sure the data is not messed up.
[ February 08, 2005: Message edited by: M Beck ]
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The concept of locale is not limited to Unix-like operating systems. Windows uses it as well. As stated above, it typically includes information for formatting date, time, or currency information. For example, in the United States, dates are typically in the "mm/dd/yyyy" format. However, some parts of the world use "dd/mm/yyyy". This means that the date "02/09/2005" can be either Feburary 9th 2005 or September 2nd 2005, depending on the current locale settings.

Java provides the java.util.Locale class to ease the burder of "localizing" code when these differences matter.

Layne
 
M Beck
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh, i knew windows has a similar concept, but i wasn't sure if the same term was used to describe it. thanks for clearing that up for me.
 
reply
    Bookmark Topic Watch Topic
  • New Topic