"/Users/[my account]/Library/"
Last not least, when triggering directly the Unix side of the system the same path may be written
~/Library/
As you see, none of these path embed "Utilisateurs" or "Bibliothèque"
If the well known pid headed user try to use the "french" pathname he see :
tell application "Finder"
set leDossier to folder "SSD 500:Utilisateurs: [my account] :Bibliothèque"
end tell
log leDossier --> (*folder Library of folder [my account] of folder Users of startup disk*)
leDossier as alias --> alias "SSD 500:Users: [my account] :Library:"
As the same user hate to speak to Finder he would try to use :
tell application "System Events"
set leDossier to folder "SSD 500:Utilisateurs: [my account] :Bibliothèque"
end tell
And the result would be:
error "Erreur dans System Events : Il est impossible d’obtenir folder \"SSD 500:Utilisateurs: [my account] :Bibliothèque\"." number -1728 from folder "SSD 500:Utilisateurs: [my account] :Bibliothèque"
To be short, when we speak to AppleScript the best thing to do is to forget the localized pathname.
CAUTION, it's important to know that several properties of files/folders etc may be localized and it's the source of some questions asked from time to time.
I wish to add some words about a not so old question.
You asked if there is a way to do that :
return index of (month of my_date) in {list of months contants}
There is no pre-built list of months names.
If you want one, you must built it:
set monthsNames to {}
"11/11/11"
set aDate to date result
repeat with m from 1 to 12
set month of aDate to m
set end of monthsNames to month of aDate
end repeat
monthsNames
--> {January, February, March, April, May, June, July, August, September, October, November, December}
As our brave old AppleScript is unable to return index of anItem in aLisOfItems, when we were young we used :
set theMonths to "123JanFebMarAprMayJunJulAugSepOctNovDec"
(get month of (current date)) as text
text 1 thru 3 of result
set monthIndex to (offset of result in theMonths) div 3
Emmanuel, the Smile evangelist, offered an alternate scheme using only arithmetic operations but I was never able to remember it.
Happily, somebody in the AppleScript team was fair enough to add the ability to grab the month of a date as a numerical value but he was so shy that if my memory is right he didn't wrote that in AppleScript User Guide.
I'm to lazy to search in my archives to check if at least this "new" feature is described i an AppleScript release note but as you were able to see in the late Luther's answer, it really works.
Yvan KOENIG (VALLAURIS, France) dimanche 17 mai 2015 16:49:31