Localisation problem
Friends and experts,
On my English Win7-x64 with FrameMaker 14.0.2.425 (en) I have this very simple script, which I also tested on the machine of my wife (Win7-x32, German) with the German version of FM 14.0.2.425:
/* ETBtest.jsx
To be placed in Startup folder of user area */
#target framemakeralert ("Testing $.locale= " + $.locale);
var gsETBtest_title = { en: "Testing a jsx script in %apdata%\...\FrameMaker\vv\Startup [ETB]",
de: "Test eines jsx scripts in %apdata%\...\FrameMaker\vv\Startup[ETB]"
};
var gsETBtest_msg = { en: "Befor You test your own script, rename this script to ETBtest-ori.jsx"
+ "\n• Name Your script ETBtest.jsx"
+ "\n• You can now invoke it from the ETB tool-bar Extra (last icon)."
+ "\n\nAfter your tests please rename ETBtest-ori.jsx back to ETBtest.jsx",
de: "Vor dem test Ihres scripts bitte dieses script auf ETBtest-ori.jsx umbenennen"
+ "\n• Benennen Sie ihr script ETBtest.jsx"
+ "\n• Nun kann ihr script von der ETB tool-bar Extra (letztes icon) aufgerufen werden."
+ "\n\nNach den tests bitte ETBtest-ori.jsx zurück benennen auf ETBtest.jsx"
};
var gsETBtest_NoDoc = { en: "No book or document active",
de: "Kein buch oder dokument aktiv"
};SetUpMenu(); // out-comment for debugging
function SetUpMenu() { // =========================================================================
// This function MUST NOT be named DefineMenu - because this is a reserved function!
// Errors in ESTK: Menu position can not be changed - see bug report FRMAKER-2752
// No menu is defined here - it is set up in customui.cfg / menus.cfg
var cmdDoc = DefineCommand (1, "ETBtest", "Test a script [ETB]", "");
UpdateMenus();
} // --- end SetUpMenufunction Command(cmd) { // ========================================================================
switch(cmd) { // Respond to menu command.
case 1:
WhatIsToDo();
break;
}
} // --- end Commandfunction WhatIsToDo () { // === This is what the test script will do ===============================
alert (localize(gsETBtest_msg), localize(gsETBtest_title));
return;
}
On my English system/FM the alert reports
Script Alert
Testing $.locale= 2
and the invoked script (by button) reports the en message from the gsETBtest_msg object.
On the German system/FM the alert reports
Script Fehler
Testing $.locale= 3
and the invoked script (by button) reports the en message from the gsETBtest_msg object.
I get the German 'reaction' of the script only if I insert on the top of the script - which of course is not very useful for a bi-lingual script:
$.locale = "de";
What goes wrong here?
The method is described in JavaScript Tools Guide of CS5.
By the way: changing the order of the string declarations (have de first, en second) has no effect on both systems.

