🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #644

[JS CS3 Mac&Pc] Enabling automatic localization problem

#644
From: Kasyan_Servetsky
Date: Wed, 11 Mar 2009 16:34
37 lines
1898 bytes
Hi all,

I’m trying to enable automatic localization in my script, as described in ‘Localization in ScriptUI Objects’ section of ‘JavaScript Tools Guide’ for CS3 (pages 87-88).

I try the first example and it works as expected:

$.locale = "fr"; 
w = new Window('dialog', 'Test'); 
btnText = { en: "Yes", de: "Ja", fr: "Oui", ru: "Да" }; 
b1 = w.add ( "button", undefined, localize(btnText) ); 
w.show();



Then I read the following: 

      If you do not need variable replacement, you can use automatic localization.
      To turn on automatic localization, set the global value: $.localization=true




I really don’t need variable replacement in my script and don’t want to type localize() around every string over and over again, because there are countless numbers of them.
So automatic localization is just what the doctor ordered. I try the second example, but instead of the localized string I get ‘Object’.

$.locale = "fr"; 
$.localize = true; 
w = new Window('dialog', 'Test'); 
btnText = { en: "Yes", de: "Ja", fr: "Oui", ru: "Да" }; 
b1 = w.add ( "button", undefined, btnText ); 
w.show();



Any1 have any ideas?

Kasyan
Technical Details
Message-ID: <59b82ec4.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,d74f91f69ed2dfb5,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Kasyan_Servetsky@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: [JS CS3 Mac&Pc] Enabling automatic localization problem
Message-ID: <59b82ec4.-1@webcrossing.la2eafNXanI>
Date: Wed, 11 Mar 2009 09:34:19 -0700
Lines: 36
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit