to get the specific locale string, you need the specific local version of InDesign installed.
I once tried the method app.translateKeyString().
It's doing, in a very narrow sense, what it is supposed to do.
So if you have the English version of InDesign installed, you will get "[Basic Paragraph]".
I will get "[Einf. Abs.]", because my German version is the target.
For multiple languages installs there's quite a few methods.
for changing the language settings.
Also one can through CC download multiple installations of the same app in different languages by changing the download language preferences.
You then change the OS language and the appropriate ID version will be loaded.
I think I've got the entire range on my system.
Of course all this is not very useful if you have to do it on a client's system.
Uwe, Trev, thanks.
Unfortunately none of the above would work for me. What i am trying to achieve, in short:
I have an input xml that (among a lot of other things) can contain specified paragraph and character styles.
The xmls can come from a variety of systems and locales so they can contain stuff like "[Einf. Abs.]" or "[Basic Paragraph"] or " [Paragraphe standard]" and i need all of them to map to "$ID/NormalParagraphStyle".
And, of course, the same thing is valid for almost any translatable indesign stuff (character styles, table styles, colours etc)
I would guess it would be very tough to do that on the fly. And you would have to somehow collect all the translations strings in advance and store them as a json file or something.
The localized strings are stored as Zstrings in the presets folder (after you've installed all the localizations using the methods above.
This post should be very helpful of how to go about it Localized Presets/Actions folder?
It's more likely that the SDK guys know more about it.
For gaps that might be in the dictionaries maybe for Gelb, Gul or Jaune you could fill in manually.
Make sure to come back with a report of how you managed to get it done!
Just some side notes:
A basis swatch like "C=100 M=0 Y=0 K=0" is named the same in a German and an English InDesign. But you cannot be sure about that of any other local installation of InDesign.
So, if the "same" color is used in a French originated inDesign document the name would be different. Besides individual locale strings, we have to look at the abbriviations, that would be automatic set for CMYK (and maybe other things as well).
app.translateKeyString() would not do that for us.
Another field of locale strings is in the property space of a placed image.
In English it might be "Grayscale", if you ask my German InDesign it is "Graustufe".
What to do about that?