Other Languages Support

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

Mike Hale

Other Languages Support

Post by Mike Hale »

And the great thing about Z-Strings is it will now work for all the languages that Photoshop supports, not just French.
mycort

Other Languages Support

Post by mycort »

this works great for other languages now, but will it affect my english version? Do I need to keep my original code snippet for English or does it matter at all?
Mike Hale

Other Languages Support

Post by Mike Hale »

As I said, Z-Strings are used to localize for all Photoshop supported languages. Including both version of English.
mycort

Other Languages Support

Post by mycort »

ah, got it. sorry for being ignorant....not a programmer and dont understand it too much....thx again.
schroef
Posts: 33
Joined: Sat Apr 11, 2020 6:22 am

Re: Other Languages Support

Post by schroef »

DOes anyone know if we can add custom Zsrings. I do know sort of how it works. It simply looks at the UIlocalize and find the locale folder and loads that DAT file with the strings.

I now use a method per script of adding localize. For a trick i put them all in 1 JSX and link that in. But id rather use something like the Zstring. But the documentation also states its something internal from Adobe. Why then show what it is?!?!

This is I my method of use now, use applyToAllLayers to run a script on all selected layers, or sublayers. I wanted a localize history output or use it on other parts like the progress bar or counters and dialog windows. I also tried it by adding them all in a JSON file. I noticed the structure is the same. However when i load and read the JSON file, it adds the complete file as a history message. It doesn't understand the single attributes or parts in file. I tried get parts of them by using msg[3] for example. But that returns the 3rd letter of the string. Basically it loads it all as a string. The structure feels broken compared to below example.

Code: Select all

// Call main function from getselected, we can reuse scripts
var ScriptFilePath = Folder($.fileName).parent.fsName;
$.evalFile(new File(ScriptFilePath + '/AnimD2_applyToAllLayers.jsx'));

locColorRed = {
    en: "Colorize the Video Frame in Red",
    fr: "Coloriser le cadre vid\u00E9o en rouge",
    nl: "Kleurbedkking Video Frame in Rood"
};

colorRed.main = function() {
    applyToAllLayers(colorRed);
};

app.activeDocument.suspendHistory(localize(locColorRed), 'colorRed.main()');
schroef
Posts: 33
Joined: Sat Apr 11, 2020 6:22 am

Re: Other Languages Support

Post by schroef »

mycort wrote: Wed May 01, 2013 10:34 pm Perfect and completely solved the problem, it now works! thx alot!
This scripts doesn't seem to work always? I tried it in a simple doc with 3 layers. Only worked for 1 layer then nothing happens on 2nd and 3rd run?
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: Other Languages Support

Post by Kukurykus »

If it's going to help you any way there is tw10428_Photoshop_en_GB.dat in
C:\Program Files\Adobe\Adobe Photoshop 2020\Locales\en_GB\Support Files