• 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: Month Names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Month Names


  • Subject: Re: Month Names
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 10 Nov 2009 13:00:58 -0800

On Nov 10, 2009, at 12:38 PM, Luther Fuller wrote:

> On Nov 10, 2009, at 12:22 PM, Christopher Nebel wrote:
>
>> Sort of.  Ed is correct in that the initial result is an enumerator, not text, and is therefore never localized.  Coercing it to text uses the normal enumeration-to-text coercion, which simply gives you the name of the enumeration as text, so it stays in English.  There is no totally reliable way in pure AppleScript to get the localized month name.  However, you can fake it for particular locales by tearing apart date strings; you can use 'do shell script "date +%B"' if your LANG is set properly; and if you're using AppleScriptObjC, you can use CFDateFormatter.
>
> I can't get any language other than English on my Mac. Perhaps it has something to do with installing the system in English.
>
> If the Mod Date column always shows the month in English, then I will simply use English for the month named folders my script will create.

Nope.  It's determined mostly by the setting in System Preferences > Language & Text > Formats > Region -- set it to something else (you may need to turn on Show All Regions to get a really dramatic effect), and you should see dates in the Finder's "Date Modified" column change immediately.  The language for the relative dates ("Yesterday", "Today") are determined by your primary language (Language & Text > Language), though that might not work if you stripped out all the non-English resources.


--Chris Nebel
AppleScript Engineering

 _______________________________________________
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

  • Follow-Ups:
    • Re: Month Names
      • From: Luther Fuller <email@hidden>
References: 
 >Re: Month Names (From: "Stockly, Ed" <email@hidden>)
 >Re: Month Names (From: Luther Fuller <email@hidden>)
 >Re: Month Names (From: Christopher Nebel <email@hidden>)
 >Re: Month Names (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: spurious timeout on nth Apple event on Snow Leopard
  • Next by Date: Change Xcode group order
  • Previous by thread: Re: Month Names
  • Next by thread: Re: Month Names
  • Index(es):
    • Date
    • Thread