I’m trying to understand how applescripts can be localized. I started with the material in the ASLG but, it did not work. I found a good example on MacScripter. But, that also did not work. No matter what I do, the script only displays the original key instead of the localised text.
This is the script example I tried:
displayLocalized()
on displayLocalized()
display dialog (localized string "CONTINUE") buttons {localized string "YES", localized string "NO"} default button 1 with icon caution
if button returned of result is (localized string "NO") then error number -128
end displayLocalized
This is the content of the localised.strings file:
I placed the localised.strings file into a folder inside a script bundle:
When I run the script, I get a dialog box with “CONTINUE”, “YES”, and “NO” instead of the localized text.
The localised.strings file is a UTF-8 file. I also tried saving it as UTF-16 with no better result. Telling Finder that it is an Xcode file changed the file type but was no improvement.
I’m clearly not understanding something simple but, can anyone point me to the solution ?
Thanks.