Export and import variables
Hi all,
actually I'm seeking to find anyway to select all text on illustrator file then convert them all to variables then export it to .XML at the same path with illustrator file to be translated then import the same .XML after translation
i tried a lot but i stopped at the first step is to select all text frames and convert them to variables
var idoc = app.activeDocument;
var ilayer = idoc.activeLayer;
for (i=0; i<ilayer.textFrames.length; i++) {
var itext = ilayer.textFrames;
var idocvar = idoc.variables.add();
idocvar.kind = VariableKind.TEXTUAL;
try {itext.contentVariable = idocvar}
catch (e) {idocvar.remove()}
}
any help please !!
Suzan
