• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What is the System language
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the System language


  • Subject: Re: What is the System language
  • From: Jean-Christophe Helary <email@hidden>
  • Date: Thu, 12 May 2011 21:31:54 +0900

>>>> Hi all,
>>>> I´m looking for an apple script snippet to find out what language my system is.
>>>> A UNIX script would also do.
>>>
>>> do shell script "defaults read 'Apple Global Domain' AppleLocale"
>>
>> The result is not accurate.
>>
>> My $LANG variable is set to "fr_FR.UTF-8" for a reason I don't know but my system is in English.
>>
>> The above command gives:
>>
>> fr_FR@currency=JPY
>>
>> But defaults read NSGlobalDomain AppleLanguages gives en as the top language.
>
>
> Thanks for the feedback.
>
> I guess that you are running the system in English while you are in France.

No. I am in Japan and this 27" iMac has never left Japan. I seem to remember that I once set the language environment (through System Preferences > Languages) to French to test a software but I don't seem to remember changing anything else on a system level.

Besides I have no user space shell settings that would change the Terminal locale to a French locale.

In fact, I just found that on MacOSXHints:
http://hintsforums.macworld.com/showthread.php?t=81848

And indeed, when I uncheck that preference I get an empty value when I do "echo $LANG", but [defaults read 'Apple Global Domain' AppleLocale] still gives me fr_FR@currency=JPY, even though my top language is EN.

So I guess the system must be taking its locale data from this AppleLocale variable and assign it to LANG when requested to do so. But AppleLocale does not seem to reflect the system's main language... Weird.



Jean-Christophe Helary
----------------------------------------
fun: http://mac4translators.blogspot.com
work: http://www.doublet.jp (ja/en > fr)
tweets: http://twitter.com/brandelune

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >What is the System language (From: Ronald Hofmann <email@hidden>)
 >Re: What is the System language (From: KOENIG Yvan <email@hidden>)
 >Re: What is the System language (From: Jean-Christophe Helary <email@hidden>)
 >Re: What is the System language (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: What is the System language
  • Next by Date: Re: What is the System language
  • Previous by thread: Re: What is the System language
  • Next by thread: Re: What is the System language
  • Index(es):
    • Date
    • Thread