I was referred to the scripting forum from the InDesign product forum. My problem is as follows:
I'm working on a multi-language project at the moment. I'm using an English language file as a source (alas, not prepared by myself), and exported an .inx file, then converted it to ttx for the translators. The translated .ttx file is then converted back into .inx, which works like a dream in normal circumstances.
Now, my problem is, that I have three different translated files (three languages to add to the source English). Each of them opens beautifully as an individual Indy file, but now I need to collect all languages into single file, so that each language is on its own layer, with editable text and movable elements.
Since the document is almost 150 pages long (with similar projects coming up) and almost all texts are in separate text frames, duplicating the source layer three times and copypasting the translations into them is NOT an option ;)
a) any way to import layers (and their contents) from one document to another,
b) any way to merge the .ttx files so that they would provide me with a four-layered, four-language document?
I know that the latter sounds a bit desparate, but I'd be willing to try even that one out as well (at the risk of royally f***ing up the tags), since I know that any extra work I put in now trying to find a solution will save me oodles of hours in the future.
Any suggestions, anyone?
PS: If there is a solution c) do not hesitate to tell me, I'm sure I haven't approached the problem from all possible angles!
Separate text frames -- that's bad, real bad ... You can't even replace the original English text in one go. Any chance you could thread them together, using Frame Breaks (either hard, or in some first style per separate frame) to jump from frame to frame?
How are you identifying which part of the translated text goes where? If there are unique identifiers, separating each part, you could think of something using those. Add a
to each of your original text frames (using the Script Label panel), then let a script cut up the text and put it into each one.
Tiina, you said: "duplicating the source layer three times and copypasting the translations into them is NOT an option".
This would actually seem to me to be the best way to go. Only don't copy-paste the text, but the entire contents of the document. Basically, you should duplicate the source layer, select all, delete, open one of the target files, select all, copy, and then paste in place in the new layer of the source file.