Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I localize textstrings in the <javascriptresource> section?

New Here ,
Mar 01, 2014 Mar 01, 2014

I have made a Javascript that work with actions by using the <javascriptresource> and <terminology> tags. The localize function do not work or any other method I can find in Adobes documentation. Any one now how localize the text in these sections, like the name for the script in the menus?

TOPICS
Actions and scripting
659
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Advisor ,
Mar 02, 2014 Mar 02, 2014

It works pretty much the same way sort of. From ContactSheetII in PSCS6 and later:

<javascriptresource>

  <name>$$$/AdobePlugin/PIPLInfo/PluginName/ContactSheetII=Contact Sheet II...</name>

  <menu>automate</menu>

  <category>$$$/private/ContactSheet=**ContactSheet**</category>

  <eventid>0B71D221-F8CE-11d2-B21B-0008C75B322C</eventid>

<terminology><![CDATA[<< /Version 1

    /Events <<

       /0B71D221-F8CE-11d2-B21B-0008C75B322C [($$$/AdobePlugin/PIPLInfo/PluginName/ContactSheetII=Contact Sheet II...) /contactSheetSettings <<

           /InSr [($$$/AETE/ContactSheet2/Source2=source) /typeInputSource]

           /InpD [($$$/AETE/ContactSheet2/Source=source) /typePlatformFilePath]

           /InSd [($$$/AETE/ContactSheet2/Directories=Directories) /typeBoolean]

           /Wdth [($$$/AETE/ContactSheet2/SheetWidth=sheet width) /typeUnitFloat]

           /Hght [($$$/AETE/ContactSheet2/SheetHeight=sheet height) /typeUnitFloat]

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 02, 2014 Mar 02, 2014

Thanks for your answer.

But I'm a bit confused. The Zstrings, like $$$/AETE/ContactSheet2/Source2=source from your example, are for Adobes internal use. The only way that I figured out to make the Zstrings work in my script is to append my own Zstrings in Adobes locale .dat-file tw10428,dat. But that file is controlled by Adobe and can be changed at any time, and I think that script writers is not supposed to alter that file.

"Outside" the <javascriptresource> and <terminology> tags the localize function works to make text strings local. But for the <javascriptresource> and <terminology> tags I have only found the Zstrings to work.

Is there any other way to make strings local in these tags or is it possible to control which dat file the local strings shall be read?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 02, 2014 Mar 02, 2014

Is there any other way to make strings local in these tags or is it possible to control which dat file the local strings shall be read?

There is/was a technique where you could have a set of your own .dat files (one per locale) in the same folder as your script and PS would use that automatically. I never got it to work but I never tried very hard; somebody else might have a clue.

However, I believe that using custom .dat files would only happen of $.localize is set to true. If that is the case, then you're out of luck as the <javascriptresource> and <terminology> is parsed out of the file at PS startup. It doesn't execute the script so $.localize cannot be set.

You're best bet is to find strings in the tw10428.dat file that best suit your needs. That should work for most typical strings but I doubt that javascriptresource.name is going to be one of them.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 03, 2014 Mar 03, 2014
LATEST

Thank you for the information.

It would be interesting to know if some one have found a "secure" or official way to append Zstrings to the tw10428.dat.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines