Rép: reading a property list item
Rép: reading a property list item
- Subject: Rép: reading a property list item
- From: KOENIG Yvan <email@hidden>
- Date: Tue, 20 May 2008 14:26:12 +0200
Le 20 mai 2008 à 12:29, KOENIG Yvan a écrit :
…
I don't see where is the wrongdoer because I uses exactly the same
syntax in both cases.
What a fool, The Dutch.lproj is deleted on my system.
Searching the wrongdoer, I found a file from which grabbing the month
name is easier.
--[SCRIPT]
set dd to "1/12/2008"
set ladate to my traduitLaDate(dd, 2)
on traduitLaDate(d, l)
local nomsDesJours, ladate, numJour, annee, nomJour, itemNomJour,
nomMois, listeLangues, laLangue, p2a, nomDuJour, nomDuMois
set nomsDesJours to {"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"}
set ladate to date d
set numJour to day of ladate
set annee to year of ladate
set nomJour to (weekday of ladate) as text
repeat with i from 1 to 7
if nomJour is item i of nomsDesJours then exit repeat
end repeat
set itemNomJour to "10003.00" & (i - 1)
set nomMois to "FIELD_" & (month of ladate)
set listeLangues to {"da", "Dutch", "English", "fi", "French",
"German", "Italian", "Japanese", "ko", "no", "Spanish", "sv",
"zh_CN", "zh_TW"} (*
• Languages available in Pages *)
set laLangue to (item l of listeLangues) as text
set p2a to path to applications folder as Unicode text
tell application "System Events"
set nomDuJour to get value of property list item itemNomJour of
property list file (p2a & "iTunes.app:Contents:Resources:" & laLangue
& ".lproj:Localizable.strings")
set nomDuMois to get value of property list item nomMois of
property list file (p2a & "iWork
'08:Pages.app:Contents:Resources:Templates:Brochures:Program
PL.template:Contents:Resources:" & laLangue &
".lproj:Localizable.strings")
end tell
return nomDuJour & ", " & numJour & " " & nomDuMois & " " & annee
end traduitLaDate
--[/SCRIPT]
Yvan KOENIG (from FRANCE mardi 20 mai 2008 14:12:29)
_______________________________________________
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