-
Get Localize Path with scripting
Hello,
I have a script which requires the full path of the folder and object. Everything works smoothly, however, that is if the user’s os language is set to English.
I know for a fact, based on AE’s javascript tool guide, we can temporarily set the locale to a different language to test the locale. For example this example works.
message = { en_GB: "Please select a colour.",
en: "Please select a colour.",
de: "Bitte wählen Sie eine Farbe.",
};
$.locale = "de"; // spanish
alert(localize(message));
$.locale = null; // restore to the locale of the app
However, when I try to target it with a Folder.selectDialog() to try to get the localize path of the folder, it doesn’t work.
$.locale = "es"; // spanish var chooseFol = Folder.selectDialog();
alert(localize(chooseFol.fsName));
$.locale = null; // restore to the locale of the app
For eg. If I select the Documents folder with the above, it still shows “C:\Users\Username\Documents”, however I know for a fact that if the language is set to Spanish, Documents would be listed as Documento, which has been breaking my script. I hope someone has some insights.
Thanks in advance!
Sorry, there were no replies found.