Re: Localized Internals of AppleScript (date Class for example)
Re: Localized Internals of AppleScript (date Class for example)
- Subject: Re: Localized Internals of AppleScript (date Class for example)
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 15 Apr 2005 10:09:53 -0700
On 4/15/05 8:46 AM, "Emile Schwarz" <email@hidden> wrote:
> There is a difference between the way to set the date (French) and the way to
> get the date constants back (English) and I do that in the same script, a two
> lines script.
>
> Of course, I do not use Mac OS X like the domestic users do: I use the French
> language thus French setting, but why the US constants ?
> If the Language is able to do one part why not the second part ?
Because one is a string and the other is a constant. If the constants were
localized, everybody's scripts would only work in their own locale and would
break everywhere else. Why do you think that would be a good thing? The way
it is now, dates, and date parts, work everywhere, and then string
representations of these dates appear correct in the local language on the
local computer.
What would be useful would be some sort of 'as local text' coercion:
weekday of someDate
--> Thursday
weekday of someDate as local text
--> "jeudi"
Thursday as local text
--> "jeudi"
But you could still write scripts that worked in all locales:
if weekday of someDate is Sunday then return -- day off
There would be no way to write such a script if the constant Sunday wasn't
constant everywhere.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden