• 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: Getting the default language with AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the default language with AppleScript


  • Subject: Re: Getting the default language with AppleScript
  • From: Emmanuel <email@hidden>
  • Date: Sun, 25 Jul 2004 16:51:45 +0200

Augmenting Axel's record:

Axel is 10.3.4 (fr_FR)
Emmanuel is 10.2.8 (en_US)

======
$ defaults read com.apple.dock loc
Works for: Peter, dev_sleidy, Axel, Emmanuel
Doesn't work for: Paul (S.), Martin
======
$ defaults read com.apple.systempreferences AppleIntlCustomFormat
Works for: Martin, Paul (B.), dev_sleidy
Doesn't work for: Alexandre, Axel, Emmanuel
======
system attribute "LANG"
--> ""
According to Paul (B.), this returned valid info under Jaguar or earlier.
======
$ defaults read -g AppleLocale
--> fr_FR
Works for: Paul (S.), Paul (B.), Martin, Bill, Axel
Doesn't work for: Emmanuel
======
$ defaults read -g AppleLanguages
--> (French, English,German,Dutch,Italian, Japanese, Spanish, da, fi, ko, no, pt,sv,"zh_CN","zh_TW")
Works for: John, Paul (B.), Bill, Paul (S.), Axel, Emmanuel
Doesn't work for: -
======

So far, my proposition is:

------------------------
on UserLanguage()
set x to system attribute "LANG"
if x = "" then set x to do shell script "defaults read -g AppleLocale"
find text "^[^_]+" in x with regexp and string result
end UserLanguage
------------------------

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Getting the default language with AppleScript
      • From: Paul Berkowitz <email@hidden>
    • Re: Getting the default language with AppleScript
      • From: Paul Skinner <email@hidden>
References: 
 >Re: Getting the default language with AppleScript (From: Paul Berkowitz <email@hidden>)
 >Re: Getting the default language with AppleScript (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: existence and addressing of smb mounted volume
  • Next by Date: Re: Making folders and files as non-admin user [WAS: Re: Privileged shutdown]
  • Previous by thread: Re: Getting the default language with AppleScript
  • Next by thread: Re: Getting the default language with AppleScript
  • Index(es):
    • Date
    • Thread