Re: Month Names
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