Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Getting user Locale settings?

Thread Tools

Getting user Locale settings?
Posts: n/a
On MacOS X, Windows XP and other modern operating system the user can
specify the regional settings ( in International System Preferences on
MacOS X and Regional Control Panel on Windows XP). While in many cases
users will choose the region and stick with that, others will takeit
and then customise things like date format, time format, etc. For
example I choose Canada (en_CA), but would rather have my date format
be yyyy-MM-dd and my time format be HH:mm:ss.

What I am wanting to do from Java is get the settings the users
specified for their environment. I don't believe that the application
should need to ask the user respecify these settings. The closed I
found was Locale.getDefault(), but it doesn't recognise customisations
the user might have done for the environment. Since that doesn't seem
to do the job I would be curious to know if there is an alternative
solution, without having to revert to specifics.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
the relation between C++ locale and C locale zade C++ 1 03-05-2010 06:04 PM
Re: List of locale values for locale.setlocale() under Windows Gabriel Genellina Python 0 02-18-2009 12:00 AM
Create C++ std::locale without changing C locale C++ 4 08-26-2008 01:15 PM
i18n problem, involving Locale.getDisplayLanguage and Locale.getDisplayCountry Maurice Hulsman Java 1 07-25-2004 06:11 PM
locale.nl_langinfo(RADIXCHAR) vs locale.localeconv()['decimal_point'] Jeff Epler Python 2 08-31-2003 02:18 PM