Skip navigation
Currently Being Moderated

Illustrator path to Presets/Scripts including locale

Aug 18, 2011 6:29 AM

Hi,

 

I've made a little jsx Illustrator script I'd like to pack as an extension.

Looked at MXI tech note Path Tokens appending and found the $presets token.

Unfortunately it does NOT include the locale in it's path.

 

For example, my path is /Applications/Adobe Creative Suite 5/Adobe Illustrator CS5/Presets.localized/en_GB/Scripts

For other locales that will be different and the $presets toke doesn't help, it's the sames as $illustrator/Presets.localized as far as I can tell.

 


How can can I set the path of my script to Illustrator's Scripts folder from my MXI ?

 
Replies
  • Currently Being Moderated
    Aug 25, 2011 1:37 AM   in reply to orgicus

    There is no such token you can use directly. I figured out this problem, but it requires some simple change in Illustrator. The following is my experiment:

    1. Add the following line to XManConfig.xml of Illustrator:

    <Data key="$localizedPresets">$presets/$LOCALE</Data>

    Please add this line after the following line:

    <Data key="$presets">$InstallFolder/../../../Presets</Data>

    2. Define the destination of your file to "$localizedPresets/Scripts"

    After that, the file will be installed to the correct location you want.

     

    I think the best solution is Illustrator add this line itself. We can suggest Illustrator add this line in its next release.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 29, 2011 12:51 AM   in reply to orgicus

    I verified it using fr_FR and zh_CN, it works fine. I didn't use en_GB.

     

    The locale is determined by several factors: the value of "DefaultLocale" in XManConfig.xml of products, the UI language of Extension Manager, the language selected by user when prompted by Extension Manager in rare cases.

    For examples, if you launch Extension Manager with French locale (in French OS or using command line parameter -locale lang="fr_FR"), the files will be installed to fr_FR sub-directory, even if your Illustrator is english version. But if you launch Extension Manager using command line parameter -locale lang="en_GB", the files will be still  installed to en_US sub-directory, since Extension Manager supports 22 different locales, not including separate support for en_GB.

    If you change "DefaultLocale" to "en_GB" in  XManConfig.xml of Illustrator, then launch Extension Manager with en_US locale, the files will be installed to en_GB sub-directory.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 29, 2011 12:56 AM   in reply to orgicus

    Hi,

     

    According to the "Packaging Extensions with Extension Manager CS5" document,Extension Manager determines the correct language by completing these steps, listed in order of priority:
    1 The language of the point product (defined in XManConfig.xml file for point product).

         The key name is "DefaultLocale" in XManConfig.xml.
    2 The language of the Extension Manager interface.

         If thelanguage of your Extension Manager is English, this value is "en_US", Extension Manager does not support "en_GB" as the specified interface language.
    3 The language selected by the user when prompted by Extension Manager.
    4 If the extension doesn’t provide files for the user-selected language, Extension Manager installs files specified by the "defaultLanguage" tag in .mxi file.

     

    Please check what the value is for the "DefaultLocale" key of the XManConfig.xml file.

     

    Thanks,

    Guo Liu

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 5, 2012 3:11 PM   in reply to orgicus

    Is this related to the problem in Illustrator that you can not add a script into the actions that will stay there even after a relaunch?  If so do you know of a solution to this issue problem?  The only way I know of to get a script inside of actions is to use the "Insert Menu Item" & the "Other Script" but this is not user freindly.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 5, 2012 11:19 PM   in reply to brian.e.

    This issue seems to have nothing to do with what you said. I think you should post your question to http://forums.adobe.com/community/illustrator/illustrator_scripting. Maybe someone can help you there.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points