Importing Translated XML Files into Illustrator: A Guide
First, You’ll need Silly-V’s Variable Importer Plugin.
To install this, right click on the "raw" button and "save link as"
Put this saved file, "VariableImporter.jsx", into the folder, “Adobe Illustrator 2020\Presets\en_US\Scripts”
If illustrator is open, restart it. The variable importer option should appear in the menu File > Scripts > Variable
You've now successfully installed the variable importer plugin!
Now to import the translated xml files: I'm using the Portuguese H2O2 and Don Doff xmls as an example here, since I've worked with them already.
Most importantly, open up the xml file in notepad (notepad++ works better here but it’s fine use whatever text editor you like). At the top, if you see a bunch of lines referencing "http://ns.adobe.com/...." it means the xml was formatted in a way which you can just import them using the variables menu in illustrator. (Here’s a guide on how to do that, courtesy of Gabe and the N95Decon team before me.)
If you don't see a bunch of stuff pointing you to ns.adobe.com, such as with the Portuguese H2O2 xml, then here's what I did to make it work with Variable Importer:
Variable Importer Formatting:
What I've found is that the variable importer plugin likes the format Name > String. However, the xml file has it flipped, and it's String > Name instead. On top of this, variable importer doesn't even take xml files. So what you gotta do is reverse these two columns and resave it as a CSV.
8/01/2020 Important Note: excel will not import the strings if the original xml file has any mention of <b></b> or <i></i> formatting, which is likely used in the xml file to bold or italicize text. Unfortunately, these will screw up the importing process, and need to be replaced or removed prior.
Open the xml file in excel. (You might be able to use google sheets for this but I’m not too sure)
You'll see that Column A contains all of the "String" data and Column B contains all of the "Name" data. Switch these two colums around. I usually do this by cutting all of Column B and inserting it before column A.
Confirm that "Name" is now Column A and "String" is now Column B.
Save the file in .CSV format. If they give you the option, pick "CSV UTF-8".
Now, to import your newly saved CSV file into Illustrator:
Open the variable importer plugin from within Illustrator (File > Scripts > VariableImporter)
Click “Choose Data File“ and open up that new CSV file you saved.
Check the box labeled “Transpose Data“. The window should now be populated with all of the variable names from the csv file. If you don’t get some funky error, that means everything is formatted smoothly and properly.
Click “Import Variables“. Confirm that the existing variables will be overwritten by the new ones. Click OK on the next window that opens up as well.
If everything went off without a hitch, then you have now successfully imported the translated XML file, and are ready to make manual edits to the formatting.