Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Get Localize Path with scripting

  • Get Localize Path with scripting

    Posted by Meng Zhiqun on November 21, 2021 at 2:36 am

    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!

    Meng Zhiqun replied 4 years, 5 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy