Copy link to clipboard
Copied
I saw a script here.
https://github.com/gsingelmann/indd_autocolumn/tree/master
The author (Gerald Singelmann) seems to have set "en" "de" "it" three languages, is it possible to automatically choose to display the appropriate language interface according to different windows systems.
I tried to add cn and nothing seems to change anything.
var sAutoColumn = { en: "AutoColumn2...", de: "AutoSpalte2...", it: "AutoColumn2..."}
if (app.selection.length) {
app.doScript(autoSpalte, undefined, undefined, UndoModes.ENTIRE_SCRIPT, localize(sAutoColumn));
}
Try an underscore instead of the minus.
https://extendscript.docsforadobe.dev/extendscript-tools-features/localizing-extendscript-strings/
Thank you.
According to Dirk Becker's pointers, I found iso639 language code.
Chinese code is zh.
and added $.localize = true;
to enable localization.
It worked.
Copy link to clipboard
Copied
@dublove can you try this please?
var sNoSelection = {
"en": "Place the cursor inside a table",
"de": "Platzieren Sie den Cursor in einer Tabelle.",
"it": "Posiziona il cursore all'interno di una cella",
"zh-CN": "将光标放在表格内",
"zh-TW": "將遊標放在表格內",
};
alert(localize(sNoSelection));
Let me know if it works on your system. You can also try this:
alert($.locale);
- Mark
Copy link to clipboard
Copied
Hi m1b.
This js is reporting errors straight away.
I've tried it and it's still displaying the English interface.
I think the representation of zh-CN is wrong.
Copy link to clipboard
Copied
It might be wrong. What does $.locale give you?
Copy link to clipboard
Copied
Hi m1b.
alert($.locale);
Popup: zh-CN.
Copy link to clipboard
Copied
Thank you.
According to Dirk Becker's pointers, I found iso639 language code.
Chinese code is zh.
and added $.localize = true;
to enable localization.
It worked.
Copy link to clipboard
Copied
Try an underscore instead of the minus.
https://extendscript.docsforadobe.dev/extendscript-tools-features/localizing-extendscript-strings/
Find more inspiration, events, and resources on the new Adobe Community
Explore Now