International Folder names in applet bundles
International Folder names in applet bundles
- Subject: International Folder names in applet bundles
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 8 Mar 2006 08:32:12 +0100
Le 8 mars 2006, à 04:32, Paul Berkowitz a écrit :
Can someone on a non-English system confirm that when you "Show Package
Contents" (whatever that's called on your system) of a bundle - in
particular a script Application (Bundle) - the folder inside is still named
"Contents" in English and inside among the several items is another folder
named "Resources" in English? Certainly when I change my primary language to
French or Japanese in System Preferences/International/Languages. log out
and in, and then check, those internal package contents (everything in
there) is still labeled in English, although the whole Finder has changed to
the selected language. Could others confirm that it's the same on computers
that came with a non-English OS "version" (language) installed? Since, there
actually seems to be only one actual OS 10.4, 10.3.9 etc, with all
localizations configurable in System Prefs, that's what it looks like.
In OS 10.4/AS 1.10, there are all sorts of new commands and parameters in
Standard Additions. One of those is 'path to resource' for finding a
specified resource file in "Resources" folder of a bundle. So, for example,
you could
set iconFile to path to resource "logo1.icns"
to find the file of that name in your main bundle of a script bundle app.
But if you want the script to work in OS 10.3 or earlier, that doesn't work.
This will:
set iconFilePath to (path to me as Unicode text) &
"Contents:Resources:logo1.icns"
set iconFile to alias iconFilePath
but only if those internal folders are _always_ called "Contents:Resources:"
in all localizations. It looks as if they are - can others confirm?
Hello Mr. Berkowitz
At least with the french system, they are in english.
Don't bother about the system's pathnames when one uses AppleScript to grab a pathname, it is the english one which is returned.
Here is a sample:
"
Macintosh HD:Users:yvankoenig:Library:Preferences:com.apple.finder.plist"
The french name for "Users" is "Utilisateurs"
The french name for "Library" is "Bibliothèque"
The french name for "Preferences" is "Préférences"
Other sample returned by AppleScript:
"Macintosh HD:Applications:Safari.app:Contents:Resources:French.lproj:"
Yvan KOENIG _______________________________________________
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