Hello,
I looking for advice as to how tro resolve an issue with
locale settings for the United knigdom.
I am trying to configure an application to except the
United Kingdom as the locale and display dates in the
proper format.
tha OS is MacOSX 10.3.9 and am running J2EE 1.4.2.
the OS is set to Great Britian and by running a simple
script I can see that the locale is set to en_GB, however,
the application does not display dates in the correct
format.
Can anyone provide me with a non-programatic way to enable
the locale to be set properly?
Thanks for the help.
Jeff Hoekstra
On Mon, 30 May 2005 16:45:24 -0700, Greg Guerin
<email@hidden> wrote:
> Ian Cheyne wrote:
>
> >>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?
>
> I mean the Strings returned by
> java.lang.System.getProperty(String). The
> relevant values should be getting set regardless of how
> the JVM is
> executed: double-clicked jar, app-bundle, or 'java'
> command.
>
> The key-Strings that java.util.Locale uses in 1.4 are:
> "user.language"
> "user.country"
> "user.variant"
>
> To see exactly how the default Locale's name is generated
> from System
> properties, read the source for Locale.
>
> The value for "user.country" should be "GB" or "US" or
> "CA" whatever. If
> it isn't changing correctly, then that's why the Locale
> is wrong. Fix the
> System Properties value and the Locale should then be
> correct.
>
> The value for "user.language" should be "en" for all
> varieties of English.
> It should change, too. Try moving Canadian French and
> Canadian English to
> the top of the Languages list and see what happens.
>
> The default language-name in Locale's source is "en", so
> if there's no
> "user.language" value, the default Locale comes up as
> English.
>
> In J2SE 1.3, the property named "user.region" is used,
> not "user.country".
> The code for 1.4's Locale is backwards compatible in the
> presence of a
> "user.region" property. I don't know what J2SE 5.0 does,
> because I haven't
> looked at its source.
>
> It may be worth printing the values of the System
> properties, not just the
> Locale that results from the properties. It may also be
> worth running the
> test on 10.4 using the 1.3 JVM, since it's still
> available, and probably
> has less in common with 1.4, than 1.4 does with 1.5.
>
>
> >I reckon this is a bug and will lodge a bug report -
> does this go against
> >the operating system or Java?
>
> I'd file it against Java, because that's where the
> symptoms are directly
> visible. Let Apple figure out whether it's deeper than
> that.
>
> -- GG
_______________________________________________
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