Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default Locale for United Kingdom




On May 30, 2005, at 1:48 PM, Greg Guerin wrote:

Ian Cheyne wrote:


I've checked the "System Preferences" application and under the "Formats"
tab it is correctly set for the "Region:" to be "United Kingdom".



AFAIK, the Formats tab has no effect on Java locales.

Java Locales only key off one thing in Mac OS X: the primary language.
That's the Language tab of the International pane, at least on pre-10.4
systems.


I don't have 10.4 installed yet, but on 10.3, dragging "British English" to
the top of the Languages list gives me en_GB as the default Java locale.
That locale is assembled from two system properties in J2SE 1.4:
user.language = en
user.country = GB


You should see the properties change as you move items atop the Languages
list. Whether there's a Locale bundle depends on the combination of those
properties. It might be worthwhile to write a Java test that looks
specifically for the Locale-bundle you want, just to see if it's present.


-- GG

I posted a question a couple of days ago about this very thing:


I have been modifying my application to correctly deal with the user's locale. It is working fine on Windows, but On Mac OS X I keep getting the default locale to be en_US even though I have set my "British English" to be my top language preference. If I set the language preference to France, I do get the correct French local and date formatting.

In my program I have the following debug line:

        System.out.println(Locale.getDefault());

This always prints en_US even when I have British English chosen. Any thoughts on how to get en-UK to appear?

I didn't get a response, but this seems like a bug to me in 1.4. -- Bill Tschumy Otherwise -- Austin, TX http://www.otherwise.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Default Locale for United Kingdom (From: Greg Guerin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.