How to localize Photoshop layer names

I'm trying to get the default layer names for background, group, etc used by Photoshop depending on users local language.
As I haven't found a direct way I decided to use javascript instead:
I have a jsx code like
function GetBackground()
var message = localize( "$$$/LayerName/Background=Background");
return message;
and in the extension I use
var result:SyncRequestResult = CSXSInterface.instance.evalScript("GetBackground");
trace(result);
but result value is undefined.
Any help would be appreciated.

Hello MSSDedalus,
the returned result from the called extend is in form of a object; so you should add this code to the extendscript (just a example):
var xml = '<object>';
var xml = xml += '<property id="strMessage"><string>'+message+'</string></property>';
var xml = xml += '</object>';
and then return the xml variable instead of the message one.
Then, you should have to modify the actionscript code as well:
var result:SyncRequestResult = CSXSInterface.instance.evalScript("GetBackground");
var oResult:Object;
    if((SyncRequestResult.COMPLETE == result.status) && result.data)
     oResult = result.data as Object;
     //Make sure oResult has the property you are expecting
       if(oResult.hasOwnProperty("strMessage"))
        var localizedString:String = oResult.strMessage;
This can be found on the official documentation too.
Best,
Luca

Similar Messages

  • Photoshop layer names not appearing in DVDSP

    DVDSP 4.0.3, Photoshop 7.0, MacBook 2GHz, OS 10.4.10
    Once I've brought my .psd file in to SP and added it to a layered menu, the layers appear, but their names do not, and I can't turn them off and on either. For example, in the inspector, under the 'General' tab of a layered menu I am unable to select which layer I want to show. The odd thing is that the correct number of layers appear- I made 9 layers in Photoshop, and 9 layers appear in the inspector, but under their name is just a '-' and I can't select the check-box under 'show.' Likewise when I create a button- can't select any individual layers. I've experienced this problem with three different psd files. Anybody seen this before?

    I have just found the same issue.
    For me, I believe it is because the domains are only used in matching rules, which the SSIS task does not support. Therefore they are not in the drop down as the SSIS DQS task cannot use them. Only map domains for data correction and you should be ok.

  • How to create new canvas at photoshop and apply a layer by layer name?

    How to create new canvas at Photoshop and apply a layer by layer name ?
    So simply what i want is
    Create a new canvas certain size such as 150x40 pixels
    Apply a layer to that canvas. Script will select the layer by layer name
    How can i do that these 2 simple things with Photoshop scripting
    CS6

    JJMack wrote:
    Something like var doc = app.documents.add(width, height, res);
    When you write Apply a layer what do you mean Script will select layer by name. A new document will have a background layer or a normal layer do you want to rename that there is onle one layer. Or do you want to add a layer by name what kind?
    thanks for answer. you know like background layer. for example when you are generating web buttons you are preparing background layers. it will select a layer like that.
    also can you post full script here if possible ? thank you.
    example : http://img12.imageshack.us/img12/844/examplepx.png
    after this i will write a text on that canvas but i will ask that after learnt this 2 steps

  • How do I get the Photoshop layer tags in JavaScript?

    I asked this question at graphic design stack exchange but they pointed me here:
    http://graphicdesign.stackexchange.com/questions/35374/how-do-i-get-the-photoshop-layer-ta gs-in-javascript?noredirect=1#comment48962_35374
    I want to do actions based on the tagged layer color (these thing 1) in Photoshop. I can't find a property inside the JavaScript documentation or the ExtendScript Toolkit that might contain the value.
    I'd prefer not to abuse the name for that, the layer tags look like a very clean solution to my problem. If only I could fetch them.
    Any Ideas?
    Kind Regards,
    Mii

    Hi, these functions will select all your layers with the specified color:
    use the command: selectAllByColor("red");
    function getIDXwithsameColor(TheColor){// search and return a list of indexes for the layers with the specified color
        var ref = new ActionReference();
        var toRet = [];
        try{activeDocument.backgroundLayer;var a=0 }catch(e){ var a = 1; };
        while(true){
          ref = new ActionReference();
          ref.putIndex( charIDToTypeID( 'Lyr ' ), a );
          try{var desc = executeActionGet(ref);}catch(err){break;}
            var cl = desc.getEnumerationValue(charIDToTypeID("Clr "));
            cl = typeIDToStringID(cl);
            var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
            ls = typeIDToStringID(ls);
            if(ls != 'layerSectionEnd'){
              if(cl == TheColor){
                toRet.push(a);
          a++;
        return toRet;
    function multiSelectByIDX(idx) {// selection function
      if( idx.constructor != Array ) idx = [ idx ];
        var layers = new Array();
        var desc = new ActionDescriptor();
        var ref = new ActionReference();
        for (var i = 0; i < idx.length; i++) {
              layers[i] = charIDToTypeID( "Lyr " );
              ref.putIndex(layers[i], idx[i]);
        desc.putReference( charIDToTypeID( "null" ), ref );
        executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
    function selectAllByColor(TheColor){// main function
      theSameClIDX = getIDXwithsameColor(TheColor);
      multiSelectByIDX(theSameClIDX);
    //...example::
    // selectAllByColor("none");
    //selectAllByColor("red");
    // selectAllByColor("orange");
    // selectAllByColor("yellowColor");
    // selectAllByColor("grain");
    // selectAllByColor("blue");
    // selectAllByColor("violet");
    // selectAllByColor("gray");

  • Working with Edge Animate, how do you change layer colors and and names of layers?

    For many years, I have worked with Adobe Photoshop, and the ability to change layer color or the name of layers is quite easy. I have been reading around about how to do this with Edge, but, can't find any information on how I might be able to do this. Can you help?
    Thank you!
    LainKennedy

    Hi Darrell,
    Thank you for your answer. When I double click on the layer name, it opens for a second, then closes. I have tried to close the app, shut down my workstation, throw out the preferences, and, nothing seems to work. Am I doing something wrong?
    Thank you, again, for your timly answer. Really appreciate your help.
    Lain

  • How to capture show layer and hide layer event in photoshop through a plugin???

    How to capture show layer and hide layer event in photoshop through a plugin???for mac

    Use the Listener plug-in found in the SDK to see how you can monitor the show/hide layer event. You can also use the Getter plug-in to show what information you can find out about the current state of Photoshop.

  • How do I copy parts of layers from one AI doc into a new AI doc and keep/create same layer names?

    How do I copy PARTS of layers containing many objects from one CS5 AI (v.15.0.2) doc into a new CS5 AI doc and keep/create the same layer names?
    To start with, I have one fairly complex AI document with 100 layers,  with several hundred items in each layer. For example, one layer named "Stars" contains  400 separate stars (not grouped), another layer named "Crosses" contains 300 separate crosses, and a 3rd layer named "Text" contains 200 separate words (not outlined).
    If I select, by marqueeing a section of the image/artboard, some (but not all) of the individual items contained in the several layers, then  paste that selection into a new CS5 AI doc, I cannot get them to  create new layers of the same name. Instead they go into one general layer (e.g. "Layer 101") as a jumble of discrete, but unorganized objects (no layers or sublayers). In other words, I have lost the 3 main layers from which I selected a bunch of objects.
    Checking "Paste Remembers Layers" has no effect on this result. In fact "Paste Remembers Layers" does not remember layers at all. Only if I select ALL the items in the several layers will it paste those layers by those names into the new doc (or create new layers of the same names).
    Of course it is a COLOSSAL waste of time copying the ENTIRE document, then pasting the WHOLE thing into the new doc (with layers retained), then deleting the parts I DON'T need, so please don't suggest that as the solution.

    No Monica, nothing in Plug-ins other than the standard installed items (extensions, filters, formats, etc.). No 3rd-part clipboard extension on my computer that I'm aware of, either. All frustratingly basic. And my other CS5 Adobe programs appear to work well, at least to the extent that I am familiar with them.
    So, from what I can tell of the various comments (thanks to all of you), am I correct in thinking that it seems I can't, in fact, do what all of you can do (that is, copy some objects from some layers in one doc and paste into another doc preserving those same layers by name and organization, and each containing the correct objects from each original layer)?
    If so, that solves half my issue - "is it supposed to be possible to do it"; leaving just the other half - "why can't I do it too".
    I'll get those screenshots made and posted later just in case I haven't adequately described the issue, or y'all haven't understood it.

  • Is it possible to preserve the layer name when I copy and paste from Illustrator into Photoshop?

    Is it possible to preserve the layer name when I copy and paste from Illustrator into Photoshop?
    At the moment it just appears as "Vector Smart Object" in Photoshop and I have to take another step and change the layer name.
    Thank you!

    Not that I know. PS doesn't care for these kinds of things and uses its own naming system.
    Mylenium

  • Photoshop Automation Plug-in - Getting non western characters from layer names and layer text

    Hi To all members of the forum.
    My name is Momir Zecevic and i have developed automation plugin for  Photoshop and it work well for almost 8 years now (Windows XP, Vista, 8, Visual studio 97 and Photoshop 7 SDK). However client for which I have written plugin wants me to add possibility for  new version so that plug-in can read  international characters from text layers (Russian , French German etc) as well as layer names if they have international characters in it.
    I have tried  but seems that I am missing something obvious
    Here is example what I get from getter
    Example:
         error = sPSActionDescriptor->Make(&desc00000B28);
         if (error) goto returnError;
         error = sPSActionDescriptor->PutString(desc00000B28, keyName, "X????????X");
         if (error) goto returnError;
    Layer name is on cyrilic (i hope that it will be displayed right here) XШЂЧЋЖЊЕЏX
    Can someone point me in the right direction.
    Thank you very much.
    Regards,
    Momir Zecevic
    Ars Media
    www.arsmedia.tv

    Tom,
    Thank you very much on your response. i'll give it a try tomorow and post results here when i have them.
    Thanks again.
    Regards,
    Momir Zecevic

  • Command-clicking layer name does not load layer as a selection (Photoshop CS2)

    Q: Why does Cmd-clicking a layer name not load the layer as a selection in Photoshop CS2?
    A: You must Cmd-click the layer thumbnail, not the layer name, to load the the layer as a selection.
    In Photoshop CS2 Cmd-clicking the layer name in the Layers Palette selects the layer. To select multiple layers use the following keystrokes:
    1. Multiple contiguous layers = Shift+click layer name
    2. Multiple non-contiguous layers = Cmd+click layer name
    See also Adobe Knowledgebase
    Document 329005

    It works for me and doesn't seem to care what tool i have selected or anything like that to make a difference. Maybe you should reset your preferences as it may be a glitch.
    Hold Ctrl+Alt+Shift as soon as you tell photoshop to startup, and it will ask you if you want to delete the preferences, just click yes. (If you have a custom UI that you want to save, goto Windows>Workspace>Save Workspace, and then just reload it after resetting prefs.)

  • How to localize HumanTask names and process names of oracle BPM process ?

    Anybody known how to localize HumanTask names and process names of oracle BPM process ?

    Oracle Apex is an API, if that helps you understand / visualize. You do not start Apex process nor stop it.
    When an Apex session starts it starts calling the API.
    You can however start / stop the listener. It may be OHS, ApexListener and the J2EE container running it, OC4J or any other "server" that you are using.
    The built-in EPG is something like an API again, you cannot start / stop it but you can disable/enable it with DBMS_XDB.SETHTTPPORT API.
    Regards,

  • How to change layer name with Wacom pen?

    Anyone have any good tips on this?
    50% of time I do this the style menu come up instead.
    With mouse, no problem, with Wacom pen, this happens.
    I don't see a right click option to change a layer name, maybe I don't see it? That would help a lot. thanks!

    kevin4545 wrote:
    Trevor,
    driver 6.1.5-2 Intuos 3.
    This has plagued me since on got on board with Wacom 5 years ago. No problem with mouse, just with Wacom.  Is there a new driver for this?
    I am using an Intuos 4 with driver 6.2.0w5
    Kevin was it you I was discussing drivers with a few weeks ago?  No, I have found the thread:
    http://forums.adobe.com/message/4186232#4186232

  • JSF - How to find layer name?

    I am new to scripting Fireworks, but have figured out allot
    so far. My current hang up is trying to determing the layer name. I
    have a script that will take a PSD file and break the frames apart
    into layers. I am looking for a script line to find the layer
    names.
    For example the name of Layer #1
    I tried using ExportLayerInfo but keep getting a syntax
    error:
    fw.getDocumentDOM().ExportFrameInfo(1,"frameName")
    I could not find any examples of using this command only
    documentation about it so I am flying blind.

    Hi,
    Structure is like an input value that holds the data for a group of elements.
    Either you can check for the same Structure ( using where-used list ) and see where all does the Structure has been used.
    Suppose, if you want to get the table name where a field (of a Structure ) has been used, then, go to the Data element of the field, again see where-used list for the tables where all this Data element has been used and then manually check for your data in which tables it has been populated.
    If it has been used in more than 1 tables, make an analysis on the tables ( being selected ) and come to a decision on a particular table(s) where the field would have to be populated.
    Please revert, if you have any further info required.
    Thanks,
    Vishnu.

  • Load files to stack with out file extention as part of layer name

    Ok so as the title says i'm trying to figure out how to modify the "Load Files to Stack..." script so that it doesn't put the file extention as part of the layer name. it makes it a pain to have to go through and remove it when dealing with a lot of layers. I'm using photoshop CS5 on Win 7.
    Also if possible a script that would make Comp Layers for each layer created when loading files to stack it's a bit much to ask but worth a shot

    If anyone is just looking to import files into stack without extension names here's what I did:
    1- Go to your adobe scripts folder:
    64 bit - C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Presets\Scripts\
    32 bit - C:\Program Files (x86)\Adobe\Adobe Photoshop CS6\Presets\Scripts\
    2 - Copy and paste these 2 files somewhere other than in the adobe folder like the desktop (I had to due to permission restrictions when saving):
    Load Files into Stack.jsx
    Stack Scripts Only\CreateImageStack.jsx
    3 - Rename these files to
    Load Files into Stack - no ext.jsx
    CreateImageStack_noext.jsx
    4 - edit Load Files into Stack - no ext.jsx (I use notepad++) and save
    Line 16 - <name> Load Files into Stack (no extension) </name>
    Line 43 - $.evalFile(g_StackScriptFolderPath + "CreateImageStack_noext.jsx");
    5 - edit CreateImageStack_noext.jsx, insert this line into "line 411" (just above "app.activeDocument.activeLayer.name = this.fName;") and save
    Line 411 - this.fName = this.fName.replace(/(?:\.[^.]*$|$)/, '');
    6 - copy and paste these edited files back into your adobe ...\Presets\Scripts\ folder (overwrite folder), reload photoshop and you should now see in File > Scripts > Load Files into Stack (no extension) available!
    And for the lazy, here are the two files
    load_files_into_stack_no_ext.zip
    drop these in your photoshop scripts folder:
    64 bit - C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Presets\Scripts\
    32 bit - C:\Program Files (x86)\Adobe\Adobe Photoshop CS6\Presets\Scripts\
    Hopefully this helps someone! Why adobe just doesn't have this as the default is beyond me.

  • A Script to Find and Replace Layer Names

    Are there any scripts to find and replace layer names?
    There is an excellent script available for Photoshop which allows you to not only replace words in layer names, but also insert words as Prefixes, Suffixes and Sequential Numbers.
    The illustrator version of this script only allows sequential numbering: It doesn't offer find and replacing of words.
    Ideally, it would be great if there was something that could do multiple find and replaces in one go:
    (e.g.
    You have layers like this Car, Dog, Bat
    You enter: car(Option1), dog(Option2), Bat(Option3)
    Your layers then become: Option1, Option2, Option3).

    big_smile, that's a very good start! Step 1 of Learning How To Script is indeed, adjusting an existing simple script to make it do more complicated things. (And usually then "break something", which is also a required part of the process.)
    You are correct in your observation this is repetitive stuff. For one or two different items that wouldn't be a problem, but in longer lists you soon get lost.
    The usual way of working with find-change lists is to build an array:
    var layernames = [
    [ 'FHairBowlBoy *Hair', 'Hairboy1' ],
    [ 'FHairCurlyafroBoy *Hair', 'Hairboy2' ],
    [ 'FHairSpikyBoy *Hair', 'Hairboy3' ],
    The general idea is to loop over all names, check if the current layer name is "layernames[i][0]" (the left column) and if so, rename it to "layernames[i][1]" (the right column). If you know how to write a loop in Javascript, then you can implement this right away.
    However ..
    A more advanced way to do this doesn't even need loop to over all layernames -- instead you can immediately "get" the correct name per layer! It's magic! Almost!
    The trick is to use a Javascript object instead of an array. Javascript objects are nothing special; Illustrator's 'layers' is an array of objects, and each object "layer" has a property "name", whose value you can read and set. What I do here is create a new object, where the "name" part is the original layer name and its value is the new layer name. All you need to check for per each layer is if there is a property 'object.originalLayerName', and if so, assign its value to that layer name.
    This looks a bit like the array above, except that (1) you use {..} instead of [..] to create an object, and (2) you add "name:value" pairs instead of "value" only (actually, the 'name' of a value in an array is simply its number).
    So this is what it looks like:
    // JavaScript Document
    var doc = app.activeDocument;
    // name indexed object
    var layernames = {
    'FHairBowlBoy *Hair':'Hairboy1',
    'FHairCurlyafroBoy *Hair':'Hairboy2',
    'FHairSpikyBoy *Hair':'Hairboy3'
    // loop through all layers
    for (var i = 0; i < doc.layers.length; i++)
    //Set up Variable to access layer name
    var currentLayer = app.activeDocument.layers[i];
    if (layernames[currentLayer.name])
      currentLayer.name = layernames[currentLayer.name];
    Enjoy!

Maybe you are looking for

  • Java script not working in firefox browser

    hi, I created my application in struts and it was running perfectly in Internet explorer. My application is a public facing application so now i am in need to run the application in Firefox and safari browsers. While running the application in those

  • Gmail Important folder not showing in Thunderbird

    I am using a program called MailWasher (MW) to preview all the emails of six accounts. I have just had a case where it showed an email from Gmail, but when I did a Get Mail it did not appear. Logging directly into Gmail I found that the message had b

  • How do I see the numbers I texted on my verizon?

    I have a prepaid iPhone plan. Im the only number on the account, and the acct owner. I need to see the numbers I texted/ texted me at certain times and when I go to usage the number fields are left blank? Thank you so much for your time and God bless

  • Reading character * at command line argument?

    import java.util.regex.Matcher; import java.util.regex.Pattern; public class FindDemo { public static void main(String[] args) { Matcher m = Pattern.compile("[aeiouAEIOU]*(\*)[atcgAGCT]*").matcher( "agctaEvening is full of the linnet's wings"); if (m

  • BAPI_SALESORDER_GETSTATUS

    Hi, I want to get the status of a Sales Order using Java/JCo programming. My SALESDOCUMENT  is '0000001234'. I want to search basing on criteria SALESDOCUMENT LIKE '1234' . This works fine. JCoFunction function = connect.getFunction("BAPI_SALESORDER_