Language Settings - Localised Strings
Localised strings are always a problem when sharing a script. Authors in this forum (including me) have used used hard coced values to over come these issues.
Here is a better way, using Apple system resources.
For example, the code snippet below will return the equivalent of "LOADING_COLLECTION" in the language set for your account
tell application "Capture One 22"
get localized string "LOADING_COLLECTION"
end tell
How did I come by this?
First note the section in the AppleScript Language Guide on "localized string" Link
Now find the "Contents/Resources" folder in your current "Capture One XX.app" bundle (in your Applications Folder). There is an "**.lprog" folder for each supported language.
Within that folder there is a file "COLocalizedStrings.strings". You should never modify this file, but reading it is informative. It can easily be read with TextEdit.
This file is a list of all? the localized strings; these are the localized strings you can request using the method in the code snippet above ... including "LOADING_COLLECTION".
-
I found this too - it works for the most part (brilliant for tokens) EXCEPT for one caveat: the newer OS's have the option to change language on a per app basis in system prefs and the localisations aren't respected in that case.
0
Post is closed for comments.
Comments
1 comment