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: Locale.getDefault().getLanguage() does not return OS locale for Norwegian



Michael, 

If my OS lanugage is Norsk, when I print this I get:

   System.out.println("Printing Info");
  System.out.println(System.getProperty("java.version"));
  System.out.println(System.getProperty("user.language"));
  System.out.println(System.getProperty("user.country"));
  System.out.println(java.util.Locale.getDefault().getLanguage());

Printing Info
1.5.0_13
en
NO
en

but if instead I setup the language to be Spanish, then I get this:

Printing Info
1.5.0_13
es
ES
es

And this is where my confusion comes...

thanks for replying.

Melissa

On Jul 1, 2008, at 4PM, Michael Hall wrote:


On Jul 1, 2008, at 1:24 PM, Melissa Amoros wrote:

Hi,

this is my problem:
when my application is installed and the OS is in Norsk Bokmal (norwegian) the call to
Locale.getDefault().getLanguage()
returns en, for English, even though the OS locale is set to Norsk.

I am using latest java 1.5 in a Mac OS X 10.5.3

Is this a bug filed somewhere? if so , could I get a link or confirmation that this is a bug?

What does this show?

public class Localization {

public static void main(String[] args) {
System.out.println(System.getProperty("java.version"));
System.out.println(System.getProperty("user.language"));
System.out.println(System.getProperty("user.country"));
System.out.println(java.util.Locale.getDefault().getLanguage());
}

}

Mike Hall        hallmike at att dot net
http://www.geocities.com/mik3hall
http://sourceforge.net/projects/macnative




Melissa Amoros



 _______________________________________________
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: 
 >Locale.getDefault().getLanguage() does not return OS locale for Norwegian (From: Melissa Amoros <email@hidden>)
 >Re: Locale.getDefault().getLanguage() does not return OS locale for Norwegian (From: Michael Hall <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.