Hi Greg, Bill and Freek,
Thank you very much for your responses.
Here is a list of related locales printed from a Mac OS X 10.4.1
installation using Java 1.4.2:
en English
en_US English (United States)
en_AU English (Australia)
en_CA English (Canada)
en_GB English (United Kingdom)
en_IE English (Ireland)
en_IN English (India)
en_NZ English (New Zealand)
en_ZA English (South Africa)
uk Ukrainian
uk_UA Ukrainian (Ukraine)
And here are my inline comments:
On 30 May 2005, at 20:37, Greg Guerin wrote:
Bill Tschumy <email@hidden> wrote:
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.
I can confirm that changing the language preference to "British
English" (on 10.4.1 and Java 1.4.2) does not result in the default
locale being "en_GB" but it is still reported as "en_US". With the
language as just "English" (not "US English"), the locale is shown
as "en_US" when it really should have been just "en". Personally,
I think there is a bug here, against the operating system. It
should not just use "English" as a language but instead use
"International English" which is (I think) how it is often
referred. If people agree I'll lodge a bug report on that!
In my experience (on
10.3.* and earlier), "British English" results in "GB", not "UK".
YMMV, so
it's best to check.
You are right - "en_GB" is the locale for British English.
Unfortunately, within Java there is a constant on Locale "static
public final Locale UK = new Locale("en","GB",""); " I think this
is where confusion creeps in. Even more confusing because the
letters "uk" are also used to describe a locale - "Ukrainian".
AFAIK, Java's default Locale depends on two things, regardless of
platform:
1) the values of several "user.*" system properties.
2) the presence of Locale bundles.
I haven't checked the first. Do you mean from Java or from the
command line or both?
The second is also easy to check.
The locales listed above look as if the right ones are there and
that the OS and the JVM are not working together for the
differences between "English", "US English" and "British English".
I tried Austrailian and Canadian English too and they both report
back as "en_US". However, setting the language to "Afrikaans" in
System Preferences does result in "en_ZA" (English (South African))
being the default Locale.
If there is a bug in the JVM, it's a new one, because this all
works fine
on 10.3 and earlier, with J2SE 1.3 or 1.4, in my experience.
I reckon this is a bug and will lodge a bug report - does this go
against the operating system or Java?
Regards, Ian Cheyne
_______________________________________________
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